Talk:TDBLookupComboBox

From Lazarus wiki
Jump to navigationJump to search

How can i set the selected value in box? e.g. in a "new book" form i need the "language_code" to be preselected to "en" and i use a dblookupcombobox to display language names... By a thousand to one chance, I answered this question when I updated this page. Have a look at the example, didn't notice there was a discussion item. MT 18 June 2014

Notes

  1. I cannot get unbound mode to display any text without setting KeyField (see below) - Mike Thompson 05 June 2014
  2. If DBLookupCombo.ScrollListDataset is set, then the component will only scroll the dataset when the user interacts with it.

Setting DBLookupCombo.KeyValue in code will not cause the DBLookupCombo to scroll the dataset.