Let's see if i can explain.
I have a combobox that is going to save presets. each time a preset is saved, it is added to the drop down list.
Each preset is a command. If i know the number of preset, I can write :
case presetscombo.itemindex of
-1, 0:
begin
{ }
end;
1:
begin
ToningFile := TINIFile.Create(directoireexit+ '\presets\myinifile.ini');
ToningCurve.ImportCurvesfromINI(ToningFile,'Toning');
end;
But that is hard coded. How would I handle itemindex 7 for example that was just added to the list?
I guess i want something dynamic and not static.
I hope i am making sense.
Thanks.
PO
I have a combobox that is going to save presets. each time a preset is saved, it is added to the drop down list.
Each preset is a command. If i know the number of preset, I can write :
case presetscombo.itemindex of
-1, 0:
begin
{ }
end;
1:
begin
ToningFile := TINIFile.Create(directoireexit+ '\presets\myinifile.ini');
ToningCurve.ImportCurvesfromINI(ToningFile,'Toning');
end;
But that is hard coded. How would I handle itemindex 7 for example that was just added to the list?
I guess i want something dynamic and not static.
I hope i am making sense.
Thanks.
PO