[Lazarus] checklistbox: row checked, count row checked, enumerator and loop

Alexander Klenin klenin at gmail.com
Mon Dec 20 00:18:03 CET 2010

On Sun, Dec 19, 2010 at 20:52, Sven Barth <pascaldragon at googlemail.com> wrote:
> On 19.12.2010 11:10, ugaciaka wrote:
>> 2. if  possibile show if a  row is checked if used enumerator (without
>> using checlistbox.checked[i] in if statment)? I use enum :=
>> checlistbox.items.getenumerator and in a loop while enum.movenext but
>> existing a property in enum.getcurrent for show if a item is checked?
> No, you can't do that either, because you need the index of the item.
> The problem is (as well in your first question) that "Checked" is maintained
> inside the listbox control itself and not inside the item list.

Of course, this loop is frequently encountered in your application,
you can write your own enumerator.

Alexander S. Klenin

More information about the Lazarus mailing list