> >> 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. Not very much that can be done about that... Ludo -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
