Description


The component is used to display/select the record. After you determine which column of the table refers this component through the Foreign Key properties and FieldName, the ComboBox will contain all the records from the database table of the selected field.

For example you have a database table containing a list of professions, after you define the properties of the component Foreign Key and FieldName, a ComboBox will contain all the professions from the database table.


Component properties

 Property

 Description

 ForeignKey

 Allows you to select a foreign key. If the foreign key is missing in the database structure, you can write the table name manually.

 FieldName

 Specifies the field whose records will be displayed in the component. You can specify multiple fields: {field1} {field2}

 BgColor

 Specifies the background color of the component.

 Filter

 A filter where you can set the condition for filtering records. You can use calculated fields in curly brackets. For example: {calc_field}=1

 Font → Color

 Specifies the font color to use when displaying the text.

 Font → Name

 Identifies the typeface of the font.

 Font → Size

 Specifies the height of the font in points.

 Font → Style

 Determines whether the font is normal, italic, underlined, bold, and so on.

 Increm. Search

 Allows you to select the button with the action "Search" or "SQL query", which will be automatically clicked when the user changes the value of the component for immediate search.

 DropDownCount

 Specifies the maximum number of items displayed in the drop-down list.

 DefaultIndex

 The sequence number of the record in the list, selected by default when a new record is created. If 0, the default entry is not selected.

 Searchable

 Determines whether it will be possible to quickly search for a record directly in the component.

 Sort

 Determines whether the records in the component will be sorted alphabetically. To sort by another field in the table, use the SortField and SortOrder properties.

 Name

 Specifies the name of the component.

 ParentComboBox

 Allows you to specify a parent ComboBox, needed to create linked lists. For example: Country > City. More info.

 Left

 Specifies the horizontal coordinate of the left edge of a component relative to its parent.

 Top

 Specifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels.

 Width

 Specifies the horizontal size of the control in pixels.

 Height

 Specifies the vertical size of the control in pixels.

 TabOrder

 Indicates the position of the control in its parent's tab order.

 TabStop

 Determines if the user can tab to a control.

 Visible

 Specifies whether the component appears onscreen.

 Anchors

 Specifies how the control is anchored to its parent. More info.




Additional properties

 Property

 Description

 AutoComplete

 Positions to matching list items as you type. Makes sense if the Style property = csDropDown

 AutoWidth

 Specifies whether the dropdown list automatically adjusts its width depending on its content.

 BevelInner

 Specifies the cut of the inner bevel.

 BevelKind

 Specifies the control's bevel style.

 BevelOuter

 Specifies the cut of the outer bevel.

 BiDiMode

 Specifies the bi-directional mode for the component.

 CharCase

 Determines the case of the text in the combo box.

 Constraints

 Specifies the size constraints for the component.  It makes sense when using the Anchors property.

 Cursor

 Specifies the image used to represent the mouse pointer when it passes into the region covered by the component.

 Enabled

 Controls whether the component responds to mouse and keyboard events.

 FirstEmptyItem

 Specifies whether the first item in the list is an empty value. Used to select a NULL value.

 Hint

 Hint contains the text string that appears when the user moves the mouse over the component. The hint will be shown if the ShowHint property = True

 MaxLength

 Specifies the maximum number of characters the user can type into the edit portion of the combo box. Makes sense if the Style property = csDropDown

 MultiSelect

 Enables multiple selection of entries in the component. Applies when using the button with the "Search" action or a script.

 ShowHint

 Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the component. See also property Hint

 SortField

 Allows you to select the field in the database, by which the records in the component will be sorted.

 SortOrder

 Allows you to select the sort order, ascending or descending.

 Style

 Determines the display style of the combo box.

 Text

 Contains a text string associated with the control.

 TextHint

 Specifies the text that is displayed as a text watermark in the edit box of the combo box control.