[Lazarus] Bug (whis) at Procedure List : SOLVED, can anyone apply?

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Oct 29 18:46:30 CET 2009


>>  cbObjects.Sorted := true;
>>  cbObjects.Sorted := false;
>>  cbObjects.Items.Insert(0, lisPListAll);
>>  cbObjects.Items.Insert(1, lisPListNone);
> Oops, see this message after sending my own :D.
> But yes that is the solution if you want that first items All and None.

That's only a tedious workaround but if you later add something to your 
list you would have to remove the first element, set "Sorted" true and 
back to false, then add the first element again. Not an elegant solution.

I would have expected that a method exists that takes the first and last 
index and then sorts between these borders. Would be much more flexible 
than this strict sort-all-or-nothing flag.




More information about the Lazarus mailing list