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.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to