Subject Re: [IBO] IB_lookupcombo
Author Helen Borrie
At 08:24 AM 20-08-02 +0000, you wrote:
>I'm using IBObjects with Delphi and I'm trying to make my
>IB_lookupCombobox's searchable.
>Whatever I try I can't do it!
>Does anyone out there know how to do this? I feel I'm missing

If you have the lookupcombo set up properly, with its dataset linked to a
key column in its keysource parent, its behaviour is as follows:

- when the parent dataset is in browse or search mode, the lkpcmbo is set
on the value being pointed to by the linked parent key on the current
parent row. It isn't searchable in this mode.
- when the parent dataset is in edit mode, searching is by incremental
search in the editbox section or by scrolling the drop-down list.

This control is "double data-aware" - the drop-down list is linked to a
query via the Datasource property; the query itself is linked to the
parent by the Keysource and Keylinks (mykey=yourkey) properties.

You can use this control as a search-only component not bound to any
parent, by omitting the Keysource and not "pairing" the Keylinks. When you
place the dataset in search mode, the incremental searching works like it
does in other single column search controls. Fetch the selected value by
reading the value you want from the selected row. You can, for example,
display a Description field in the list and the textbox and read the unique
key(link) value from the dataset.

Use the DisplayField property to select the field you want to be in the
textbox (search) part of the control.

This control expects unique, non-null values in the Keylinks column(s) of
the dataset.