Rx DB Lookup Lists

RX Library

Control Name Unit Class
TRxDBLookupList RxLookup TRxDBLookupList

Description:
TRxDBLookupList provides a list of lookup items for filling in fields that require data from another dataset. Use TRxDBLookupList to provide users with a convenient list of lookup items to set a field value using the values of a field in another dataset. Lookup list boxes usually display values that are a represent a more meaningful description of the actual field value. The relationship between field values and the corresponding values in the lookup dataset can be set using the properties LookupSource, LookupField and LookupDisplay.

This component provides the following:

  • You can select any number of fields to be displayed in the lookup list.
  • End-users can incrementally search through the lookup list by directly typing into the control. This is a great advantage when using lookup tables that contain hundreds of even thousands of records. You can perform a lookup on a Query or QBE result. It even incrementally searches on the query result.
  • The component does not have to be bound, or assigned, to a table's field (DataField and DataSource properties) which gives you greater flexibility in using this lookup list for general tasks where a source table is not involved.

If DataSource and DataField properties is set, when a user selects a list item, the corresponding field value is changed in the underlying dataset.

If IgnoreCase property is True (default), the incrementally search through the lookup list is processed without regard to case in the dataset's data.

If IndexSwitch property is True (default) and TTable component is linked to the LookupSource, the incrementally search will use available indices of lookup table.

The DisplayEmpty property allows you specify the text value to display when no item is selected from the lookup list. If DisplayEmpty set to the non-empty string, this value will be show in the top of the list additionaly to the lookup items.

You can also use an OnGetImage event to specify graphical picture to display in each item of lookup list accordingly to the contents of lookup source.


Property EmptyItemColor
Declaration: EmptyItemColor: TColor;

The EmptyItemColor property allows you specify the color value to display additional non-scrolled "empty" item in the top of the list if DisplayEmpty set to the non-empty string.


Property IndexSwitch
Declaration: IndexSwitch: Boolean;

If IndexSwitch property is True (default) and TTable component is linked to the LookupSource, the incrementally search will use available indices of lookup table.


Property ListStyle
Declaration: ListStyle: TLookupListStyle;

ListStyle determines how the lookup list displays its items when multiple fields specified by the LookupDisplay property. By default, style is lsFixed, meaning that the each display field always takes up a fixed width accordingly to their DisplayWidth properties. The lsDelimited style meaning that each field takes a variable width, and the fields are separated by a comma (',') character.


Property LookupDisplayIndex
Declaration: LookupDisplayIndex: Integer;

When multiple fields specified by the LookupDisplay property, the LookupDisplayIndex specifies index of a field in the LookupDisplay list which will be use in the DisplayValue property and will be display in the editor of the TRxDBLookupCombo component.


Property RowCount
Declaration: RowCount: Integer;

Set RowCount to the number of rows displayed in the lookup list box. The list box is resized to match the specified number of rows. Resizing the list box (such as by changing its Height property) automatically changes the value of RowCount to match the new height.


Property Value
Declaration: Value: string;

Run-time only. The value of the Value property is the contents of the DataField for the current record in the primary dataset. As the user moves through the primary dataset, the value of the Value property changes.

By explicitly changing the Value property value at run time, you change the contents of the field.


Event OnGetImage
Declaration: OnGetImage: TGetImageEvent;

OnGetImage event is triggered when an image is requested.


Type TGetImageEvent
Declaration: TGetImageEvent = procedure (Sender: TObject; IsEmpty: Boolean; var Graphic: TGraphic; var TextMargin: Integer) of object;

TGetImageEvent is the type of the OnGetImage event of the TRxDBLookupList and the TRxDBLookupCombo components.


Type TLookupListStyle
Declaration: TLookupListStyle = (lsFixed, lsDelimited);

The TLookupListStyle type is the type of the ListStyle property for a lookup list controls (TRxDBLookupList and TRxDBLookupCombo components).


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000