I wasn't clear. What I was talking about was TCheckComboBox.
TComboBoxEx has property ItemsEx which is TCollection descendant.
Property Items is covered there. I used the same what Delphi do.
______________________________________________________________
Od: "Vojtěch Čihák" <[email protected]>
Komu: Lazarus mailing list <[email protected]>
Datum: 10.09.2014 17:44
Předmět: Re: [Lazarus] TComboBoxEx and TCheckComboBox
MyStrings.Assign(ComboEx.Items) //this should work normally
ComboEx.Items.Assign(MyStrings) //this is possible via
ComboEx.AssignItems(MyStrings)
There are inconsistency but I see now way how to avoid it.
For example, the ComboEx.Items.Assign(). Here I would need some notification
that new data was assigned - to clear old TCheckComboItemStates and create new
one for each new string in list.
But there is no such notification. I tried to create new class derived from
TStringList but it lead to other problems. Class helper and FPONotifyObserver
was also a blind way.
Vojtěch
[...]
PTCheckComboItemState(Items.Objects[i])^.Data;
Although, I can do new property TCheckComboBox.Objects[] and getters + setter
will do the job.
This is possible, but it would be inconsistent to the other LCL
controls.
For example:
Items is a TStrings, so it would be nice if
ComboEx.Items.Assign(MyStrings) and MyStrings.Assign(ComboEx.Items)
works normally.
It would be nice if the Enabled states are stored outside Items.
Mattias
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
----------
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus