[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'DbCtrls' (#lcl)

TDBComboBox

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TDBComboBox - a data-aware version of TComboBox to allow selection of a value from a list of entries into a database field

Declaration

Source position: dbctrls.pp line 700

type TDBComboBox = class(TCustomDBComboBox)

protected

  procedure UpdateData(); override;

  

UpdateData - copies the new data via the datalink

  procedure UpdateText; override;

  

UpdateText - copy the new text via the datalink and calls inherited UpdateTExt

published

  property Anchors;

  

The set of anchor definitions for this control

  property ArrowKeysTraverseList;

  

ArrowKeysTraverseList - enables the operator to use the keyboard Arrow keys to move through the list as an alternative to using the mouse

  property AutoDropDown;

  

AutoDropDown - if True, the drop-down list appears as soon as the cursor moves over the text box

  property AutoSize;

  

Whether auto-size is to be used

  property BorderSpacing;

  

Determines the border spacing for this control

  property Color;

  

Determine the colour for the current control

  property DataField;

  

The name (as a string) of the Feild whose data are to be linked to the ComboBox

  property DataSource;

  

The identity of the DataSource to which the ComboBox is attached

  property DragCursor;

  

DragCursor - the style of cursor to be used during the Drag process

  property DragMode;

  

DragMode - whether manual or automatic

  property DropDownCount;

  

DropDownCount - number of entries in the drop-down list

  property Enabled;

  

Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'

  property Font;

  

The font to be used for text in this control (read/write).

  property ItemHeight;

  

ItemHeight - the height of the current item in the drop-down list

  property Items;

  

Items - an array of strings that holds the entries of the drop-down list

  property ItemWidth;

  

ItemWidth - the width of the current item in the drop-down list

  property MaxLength;

  

MaxLength - the maximum allowed length of a string

  property OnChange;

  

OnChange - event handler for any change in properties of the combo box

  property OnChangeBounds;

  

Event handler for a change in bounds of the control

  property OnClick;

  

Event Handler for mouse click

  property OnCloseUp;

  

OnCloseUp - event handler for when the drop-down box is closed up again

  property OnDblClick;

  

Event Handle for mouse double-click

  property OnDragDrop;

  

Event handler for the drop of a control onto this control.

  property OnDragOver;

  

Event handler for the case when a control is dragged over another control

  property OnDrawItem;

  

OnDrawItem - event handler for when an entry is written to the Items list

  property OnDropDown;

  

OnDropDown - event handler for when the drop-down list appears

  property OnEditingDone;

  

Event handler when editing is done

  property OnEndDrag;

  

Event handler for the end of a dragging process

  property OnEnter;

  

OnEnter - event handler for when the mouse enters the control, and the control receives focus

  property OnExit;

  

OnExit - event handler for when the mouse leaves the control and it loses focus

  property OnKeyDown;

  

OnKeyDown - event handler for instance when key is down while control has focus

  property OnKeyPress;

  

OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.

  property OnKeyUp;

  

OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus

  property OnMouseDown;

  

Event handler for when a mouse button is pressed down

  property OnMouseMove;

  

Event handler for mouse movement within the current control

  property OnMouseUp;

  

Event handler for when the mouse button is released, ie "up"

  property OnSelect;

  

Event handler when an item or some text is selected

  property OnStartDrag;

  

Event handler for start of dragging operation

  property OnUTF8KeyPress;

  

UTF8KeyPress - event controller for a key being pressed while the control has focus.

  property ParentColor;

  

ParentColor - should the control have the same colour as the parent? Default is true

  property ParentFont;

  

ParentFont - should the control use the same font as the parent? Default is true

  property ParentShowHint;

  

ParentShowHint - does the control adopt the same hinting behaviour as its parent? Default is true

  property ReadOnly;

  

ReadOnly - if True, information in the control can only be Read, not Written or Deleted

  property ShowHint;

  

Flag to determine: Is hint to be displayed for this control?

  property Sorted;

  

Sorted - whether the entries in the drop-down list have been sorted

  property Style;

  

Style : may be Simple, a single-line Drop-Down or a Drop-Down list, or some version drawn by the Owner

  property TabOrder;

  

The place this control occupies in the list of tabs

  property TabStop;

  

Is the control in the sequence of controls accessed by successive presses of the Tab key?

  property Visible;

  

Visible - can the control be seen?

end;

Inheritance

TDBComboBox

  

TDBComboBox - a data-aware version of TComboBox to allow selection of a value from a list of entries into a database field

|

TCustomDBComboBox

  

TCustomDBComboBox - a Data-aware Combo Box for displaying information from a Database

|

TCustomComboBox

  

TCustomComboBox - the base class from which TComboBox is derived

|

TWinControl

|

TControl

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TDBComboBox has properties similar to TComboBox and TCustomComboBox. It consists of an Edit Box which is th eData-aware part of the component, and a drop-down list box.

In a typical application a user would be presented with the drop-down list, would make a selection and then this would appear in the edit box and become the data value for that cell in the database.

So for example a list of countries might be presented, and the selected value from the list would be used to populate the appropriate field ('Country') in that record of the database.

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

The latest version of this document can be found at lazarus-ccr.sourceforge.net.