[Lazarus] Combobox with sorted list of unique items?

Bo Berglund bo.berglund at gmail.com
Fri Oct 12 17:01:07 CEST 2018


On Fri, 12 Oct 2018 15:30:52 +0200, Bart via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On Fri, Oct 12, 2018 at 2:30 PM Vojt?ch ?ihák via Lazarus
><lazarus at lists.lazarus-ide.org> wrote:
>>
>> I just tried TStringList(ComboBox1.Items).Duplicates:=dupIgnore; but it does not work for combo (in Qt4).
>
>Override Insert and check if it is already in there?
>
It is going to be simpler to just use a TStringList container while
reading from the ini file because it can be set for sorted and
dupignore.
Then at the end just assign the stringlist to the combobox text
property.

combobox.items.text := stringlist.text;


-- 
Bo Berglund
Developer in Sweden



More information about the Lazarus mailing list