TIB_CustomCombo Object
Properties Methods Events

Unit
IB_Grid

Declaration
TIB_CustomCombo = class(TCustomEdit)

Description
This control is used to provide an easy way for users to define cross dataset relationships. All of the handling of the key values is done in the dataset behind the scenes.

This control takes a significantly different approach than other lookup controls. This is because most of the dataset to dataset relationship handling is built in to the dataset class itself.

The relationship is defined using the KeyLinks and KeySource properties. Please refer to these for more assistance.

As long as the DisplayField property is the same as the OrderingLink of the lookup dataset it will be possible to use incremental searching.

It is case sensitive by default but if the column the lookup dataset is currently ordered by has a NOCASE entry in the column attributes then the incremental searching will be made case insensitive for you automatically.

It is also possible to leave the DisplayField property blank and have it automatically display the OrderingLink value. Thus, if there are multiple columns defined in the OrderingLinks property of the lookup dataset and the popup list allows the OrderingItemNo to be changed by clicking on the title of the popup list the control will then display the value from newly ordered column.

Thus, by leaving the DisplayField property blank and only allowing the ordering of the lookup dataset to be done with a valid OrderingLink a very flexible and functional control is realized.

Keep in mind that this control will work even with very large datasets. In order to do this though it is necessary to tune the OrderingLinks property for the lookup dataset. I have used it on a query against a table of 100K rows+ over a modem at 28K with acceptable performance.

There is a sample application for this control as well as defining KeyLinks.

Introduced Public Properties
AllowTimeout  This property determins if the incremental search string will time out after a certain period of time defined by the dataset.
AutoDropDown  This property causes the grid to automatically drop down when search criteria is being entered.
CanDropDown  Property which gives additional control over whether or not the popup list drops down.
ColLines  Property access to the popuplist.
CustomPopup  This property allows a separate TIB_LookupList component to be used instead of the default popup list.
DataSource  Reference to the dataset to which this control is bound.
DefaultRowHeight  Property access to the popuplist.
DisplayField  The field that is to be displayed in the edit portion of the control.
DropDownAlign  This property is obsolete.
DropDownCount  Number of rows in the popup list when dropped down.
DropDownWidth  Width in pixels of the popup list when dropped down.
FixedColLines  Property access to the popuplist.
FixedRowLines  Property access to the popuplist.
GridLinks  This allows a custom list of columns to appear in the default popup list.
IgnoreColorScheme  This property causes the control to ignore the coloring scheme and allow its color to be maintained manually by the application developer.
IndicateOrdering  Property access to the popuplist.
IndicateRow  Property access to the popuplist.
IndicateSelected  Property access to the popuplist.
IndicateTitles  Property access to the popuplist.
IsDroppedDown  Property to tell if the popup listbox is visible or not.
OnPrepareSQL  This event allows for custom alterations to be made to the SELECT statement's WHERE clause at prepare time.
PopupAlignment  Property to align the PopupList
  • puAuto : = puLeft if enough place to display completely else = puParentRight
  • puLeft : PopupList always left aligned to the Combobox
  • puRight : PopupList always right aligned to the Combobox
  • puCentered : PopupList always vertically centered to the Combobox
  • puParentLeft : PopupList always left aligned to Parent.Combobox
  • puParentRight : PopupList always right aligned to Parent.Combobox
  • puParentCentered : PopupList always vertically centered to Parent.Combobox
PopupColor  Colorwhich gets applied to the default popup list that is used internally.
PopupFixedColor  Property to preset the color of the fixed fields in the default PopupList
PopupList  Direct reference to the popup list being used.
PreventDeleting  Determines if the control can initiate the deletion of records.
PreventEditing  Determines if any editing changes can be made through this control.
PreventInserting  Determines if any inserting changes can be made through this control.
PreventSearching  Determines if any search criteria changes can be made through this control.
ReadOnly  Determins if any modifications can be entered through this control.
RowLines  Property access to the popuplist.
ScrollBars  Property to control the ScrollBars setting of the popup grid.
SearchKeyByKey  When searching is being performed against a text based column it is possible to have the search begin operating a character at a time as they are pressed.
SearchText  The text that has been typed in for performing incremental searching on.
SeekNearest  Determines if the nearest record should be selected as the current record or not.

Introduced Public Methods
CanModify
ClearSelection   Method to make the LookupCombo display empty in the same way as if the user pressed the DEL key with the control focused.
CloseUp   Method to cause the popup list to close up.
Create
Destroy
DropDown   Method to cause the popup list to drop down.

Introduced Public Events
OnCloseUp  This event is triggered whenever the popuplist is being closed up.
OnDropDown  This event allows a custom action to be taken prior to the dropping down of the popuplist.
OnNotInList  This property is used to take action on an item that was not found in the lookup dataset.
OnSelectionCleared  This event is triggered after the LookupCombo's value is cleared, which occurs when the user presses the DEL key or when the developer calls the ClearSelection method.