I am trying to change the Index/ItemIndex of a combobox to make the combobox change its text to the index which belongs to the title of a marker on a map.. Initially this combobox is used to assign some text to a marker which works fine, but when I try to use this combobox to "edit" the title of the marker by assigning the combobox the correct index of a given text which definetely is an item of the combobox the combobox doesnt change its text shown.. for debugging purposes I added the showmessage dialogs and they show me the correct one perfectly fine, but the text of the combobox still doesnt change... what am I doing wrong?
ComboBox1.Index := -1;
for I := 0 to ComboBox1.Items.Count - 1 do
begin
if ComboBox1.Items[I].Equals(Marker.Descriptor.Title)
then
begin
showmessage(ComboBox1.Items[I]+' is working!!!');
ComboBox1.ItemIndex := I;
ComboBox1.Index := I;
end else begin
showmessage(ComboBox1.Items[I]+' is not working');
end;
end;
using ComboBox1.ItemIndex := I; or ComboBox1.Index := I; should change the text of the combobox, right?