Class TDBFinderCombo (unit DBFCombo)

Inherits from

TCustomComboBox

Constructors


constructor Create(Owner: TComponent);

Construction and destruction


Functions

destructor Destroy;

Initialize properties

procedure Populate;

If the DataSource component is removed from the form, clear the DataSource pointer in the datalink

procedure Change;

Other methods

Other methods


procedure ClearYoungerSibs;

Call the DoLocate method when the DBFinder's text has changed

procedure CmGetDataLink(var Msg: TMessage);

for

procedure DoLocate;

Data-aware controls must respond to the Cm_GetDataLink message by returning a datalink reference

procedure EditingChange(Sender: TObject);

Allow post-search events

function GetDataField: string;


function GetDataSource: TDataSource;

Field access methods

Property access methods


function GetDisplayField: string;


function GetDisplayValue: variant;


function GetValue: variant;


procedure KeyPress(var Key: char);

TDBFinderCombo can't be used for data entry, so make this clear by disabling it if the DataSet is in editing mode

procedure Loaded;

Trap the Return key

procedure Notification(Component: TComponent; Operation: TOperation);

Populate the DBFinder - can't do it in Create because the Datasource isn't ready

procedure RecordChange(Sender: TObject);

Allow post-populate events

procedure SetDataField(const Field: string);

Request notification if the DataSource component is removed from the form

procedure SetDataSource(DataSource: TDataSource);


procedure SetDisplayField(const Field: string);


procedure SetGroupIndex(Value: cardinal);


Properties

property AutoClear : boolean


property Color :

Inherited properties

property Ctl3D :


property DataField : string


property DataSource : TDataSource


property DisplayField : string


property DragCursor :


property DragMode :


property DropDownCount :


property Enabled :


property EnterAsTab : boolean


property FilterMode : TFilterMode


property Font :


property GroupIndex : cardinal


property ItemHeight :


property LocateOptions : TLocateOptions


property MaxLength :


property ParentColor :


property ParentCtl3D :


property ParentFont :


property ParentShowHint :


property PopupMenu :


property ShowHint :


property Style :


property TabOrder :


property TabStop :


property Text :


property Visible :


property DisplayValue : variant


property Found : boolean


property Value : variant


property DataList : TStringList


Events

event OnChange :

Inherited events

event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnDrawItem :


event OnDropDown :


event OnEndDrag :


event OnEnter :


event OnExit :


event OnFound : TNotifyEvent

Events

event OnFoundElsewhere : TNotifyEvent


event OnKeyDown :


event OnKeyPress :


event OnKeyUp :


event OnMeasureItem :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


event OnNotFound : TNotifyEvent


event OnPopulate : TNotifyEvent


event OnStartDrag :


Variables

fAutoClear : boolean;


fDataLink : TFieldDataLink;


fDataList : TStringList;


fDisplayLink : TFieldDataLink;


fEnterAsTab : boolean;


fFilterMode : TFilterMode;


fFound : boolean;


fGroupIndex : cardinal;


fLocateOptions : TLocateOptions;


fOnFound : TNotifyEvent;


fOnFoundElsewhere : TNotifyEvent;


fOnNotFound : TNotifyEvent;


fOnPopulate : TNotifyEvent;



Constructors


constructor Create(Owner: TComponent);

Construction and destruction


Functions


destructor Destroy;

Initialize properties


procedure Populate;

If the DataSource component is removed from the form, clear the DataSource pointer in the datalink


procedure Change;

Other methods

Other methods


procedure ClearYoungerSibs;

Call the DoLocate method when the DBFinder's text has changed


procedure CmGetDataLink(var Msg: TMessage);

for


procedure DoLocate;

Data-aware controls must respond to the Cm_GetDataLink message by returning a datalink reference


procedure EditingChange(Sender: TObject);

Allow post-search events


function GetDataField: string;


function GetDataSource: TDataSource;

Field access methods

Property access methods


function GetDisplayField: string;


function GetDisplayValue: variant;


function GetValue: variant;


procedure KeyPress(var Key: char);

TDBFinderCombo can't be used for data entry, so make this clear by disabling it if the DataSet is in editing mode


procedure Loaded;

Trap the Return key


procedure Notification(Component: TComponent; Operation: TOperation);

Populate the DBFinder - can't do it in Create because the Datasource isn't ready


procedure RecordChange(Sender: TObject);

Allow post-populate events


procedure SetDataField(const Field: string);

Request notification if the DataSource component is removed from the form


procedure SetDataSource(DataSource: TDataSource);


procedure SetDisplayField(const Field: string);


procedure SetGroupIndex(Value: cardinal);


Properties


property AutoClear : boolean


property Color :

Inherited properties


property Ctl3D :


property DataField : string


property DataSource : TDataSource


property DisplayField : string


property DragCursor :


property DragMode :


property DropDownCount :


property Enabled :


property EnterAsTab : boolean


property FilterMode : TFilterMode


property Font :


property GroupIndex : cardinal


property ItemHeight :


property LocateOptions : TLocateOptions


property MaxLength :


property ParentColor :


property ParentCtl3D :


property ParentFont :


property ParentShowHint :


property PopupMenu :


property ShowHint :


property Style :


property TabOrder :


property TabStop :


property Text :


property Visible :


property DisplayValue : variant


property Found : boolean


property Value : variant


property DataList : TStringList


Events


event OnChange :

Inherited events


event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnDrawItem :


event OnDropDown :


event OnEndDrag :


event OnEnter :


event OnExit :


event OnFound : TNotifyEvent

Events


event OnFoundElsewhere : TNotifyEvent


event OnKeyDown :


event OnKeyPress :


event OnKeyUp :


event OnMeasureItem :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


event OnNotFound : TNotifyEvent


event OnPopulate : TNotifyEvent


event OnStartDrag :


Variables


fAutoClear : boolean;


fDataLink : TFieldDataLink;


fDataList : TStringList;


fDisplayLink : TFieldDataLink;


fEnterAsTab : boolean;


fFilterMode : TFilterMode;


fFound : boolean;


fGroupIndex : cardinal;


fLocateOptions : TLocateOptions;


fOnFound : TNotifyEvent;


fOnFoundElsewhere : TNotifyEvent;


fOnNotFound : TNotifyEvent;


fOnPopulate : TNotifyEvent;