[Lazarus] RE : RE : RE : RE : RE : @DBLookupControls users: call for test

Luiz Americo Pereira Camara luizmed at oi.com.br
Thu Dec 15 14:53:14 CET 2011


On 15/12/2011 11:44, Ludo Brands wrote:
>>>> This is the internal GUI toolkit (win32) behavior. We cant change
>>>> that.
>>>>
>>>> The same thing occurs with a vanilla combobox. There's no
>> call in LCL
>>>> or widgetset involved
>>>>
>>> Hmm.. Selecting a line with MasterId 2, highlights "eeee"
>> correctly. A
>>> miracle? No, TDBLookupComboBox.DataChange does a
>> FLookup.GetKeyIndex
>>> and updates the combobox. FLookup.GetKeyIndex does a simple
>> "run over
>>> Flookup and stops on first match". So, yes it can be changed.
>>>
>> Please, send a patch.
>>
>> Luiz
>>
> Did some further testing. The combobox gets the correct index but the
> combobox repositions the selection as soon as the dropdownbox is opened and
> the value is copied to the edit control. So windows starts the "update
> selection as you type" immediately. Looks like this is also intended to work
> on sorted strings because when you have a 'xxxx' on the top of the list and
> a 'xxx' on the bottom, you'll never get to the 'xxx' by typing the letters.
> A workaround to this is to use csDropDownList. The value is displayed in a
> text control instead of an edit control and the selection stays when opening
> the dropdownbox. Downside is that keyboard selection only works on the first
> character.

The same tests (and conclusions) i did.

> Not very much that can be done about that...

As i said before ;-)

Luiz




More information about the Lazarus mailing list