TComboBox works properly.
Items is created statically - at design time.
public
LastGroup: TList<TAdvComboBox>;
...
LastGroup := TList<TAdvComboBox>.Create;
LastGroup.Add(advcbxLastGroup01);
...
// In the class
procedure TRoundNew.GetGrData;
FGrData.Last.LastGroup := Frm.LastGroup[I].ItemIndex
No error, inaccessible value...
Items.IndexOf(..) didn't help either.
I tested title and text. They are fine.
This did the trick.
var AA: TAdvComboBox;
AA := Frm.LastGroup[I];
FGrData.Last.LastGroup := AA.ItemIndex;
I'm not sure what
FGrData.Last.LastGroup := Frm.LastGroup[I].ItemIndex
is expected to do?
I retested accessing the TAdvComboBox via a generic list but I couldn't see any issue here.
var
LastGroup: TList<TAdvComboBox>;
begin
LastGroup := TList<TAdvComboBox>.Create;
LastGroup.Add(advcombobox1);
LastGroup[0].ItemIndex := 2;
caption := LastGroup[0].ItemIndex.ToString;
end;
I expect an ItemIndex value. As you can see in the attached image, the first line, so returns "nothing".
Your test example is about something else.
Then please provide full source project with which we can reproduce this issue as well as details about Delphi version used.