Class TRxLookupControl (unit RXLookup)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner: TComponent);

TRxLookupControl


Functions

procedure ClearValue;


destructor Destroy;


function Locate(const SearchField: TField; const AValue: string; Exact: Boolean): Boolean;


procedure ResetField;

and (FDisplayField.

procedure Change;


function GetPicture(Current, Empty: Boolean; var TextMargin: Integer): TGraphic;


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


function CanModify: Boolean;


procedure CheckDataLinkActiveChanged;

if FDataLink.

procedure CheckNotCircular;


procedure CheckNotFixed;


procedure DataLinkActiveChanged;


procedure DataLinkRecordChanged(Field: TField);


function DefaultTextHeight: Integer;


procedure DisplayValueChanged;


procedure DrawPicture(Canvas: TCanvas; Rect: TRect; Image: TGraphic);


function EmptyRowVisible: Boolean;


function GetBorderSize: Integer;

if FValue <> S then Change;

function GetDataSource: TDataSource;


function GetField: TField;


function GetItemHeight: Integer;


function GetKeyValue: Variant;


function GetLookupField: string;


function GetLookupSource: TDataSource;


function GetReadOnly: Boolean;


function GetTextHeight: Integer;


function ItemHeightStored: Boolean;


procedure KeyValueChanged;


procedure ListLinkActiveChanged;


procedure ListLinkDataChanged;


function LocateDisplay: Boolean;


function LocateKey: Boolean;


procedure ProcessSearchKey(Key: Char);


procedure SelectKeyValue(const Value: string);


procedure SetDataFieldName(const Value: string);


procedure SetDataSource(Value: TDataSource);


procedure SetDisplayEmpty(const Value: string);


procedure SetDisplayValue(const Value: string);


procedure SetEmptyItemColor(Value: TColor);


procedure SetItemHeight(Value: Integer);

Max(GetTextHeight, FItemHeight);

procedure SetKeyValue(const Value: Variant);


procedure SetListStyle(Value: TLookupListStyle);


procedure SetLookupDisplay(const Value: string);


procedure SetLookupField(const Value: string);


procedure SetLookupMode(Value: Boolean);


procedure SetLookupSource(Value: TDataSource);


procedure SetReadOnly(Value: Boolean);


procedure SetValue(const Value: string);


procedure SetValueKey(const Value: string);


function StoreEmpty: Boolean;


procedure UpdateDisplayEmpty(const Value: string);


procedure UpdateDisplayValue;


procedure UpdateKeyValue;


function ValueIsEmpty(const S: string): Boolean;


procedure WMGetDlgCode(var Message: TMessage);


procedure WMKillFocus(var Message: TMessage);


procedure WMSetFocus(var Message: TMessage);


Properties

property Field : TField


property DataField : string


property DataSource : TDataSource


property DisplayEmpty : string


property DisplayValue : string


property EmptyItemColor : TColor


property EmptyValue : string


property IgnoreCase : Boolean


property IndexSwitch : Boolean


property ItemHeight : Integer


property KeyValue : Variant


property ListStyle : TLookupListStyle


property LookupDisplay : string


property LookupDisplayIndex : Integer


property LookupField : string


property LookupSource : TDataSource


property ParentColor :


property ReadOnly : Boolean


property TabStop :


property Value : string


Events

event OnChange : TNotifyEvent


event OnGetImage : TGetImageEvent


Variables

FDataField : TField;


FDataFieldName : string;


FDataLink : TDataSourceLink;


FDisplayEmpty : string;


FDisplayField : TField;


FDisplayIndex : Integer;


FDisplayValue : string;


FEmptyItemColor : TColor;


FEmptyValue : string;


FFocused : Boolean;


FIgnoreCase : Boolean;


FIndexSwitch : Boolean;


FItemHeight : Integer;


FKeyField : TField;


FListActive : Boolean;


FListFields : TList;


FListStyle : TLookupListStyle;


FLocate : TLocateObject;


FLookupDisplay : string;


FLookupFieldName : string;


FLookupLink : TLookupSourceLink;


FLookupMode : Boolean;


FLookupSource : TDataSource;


FMasterField : TField;


FOnChange : TNotifyEvent;


FOnGetImage : TGetImageEvent;


FPopup : Boolean;


FSearchText : string;


FValue : string;



Constructors


constructor Create(AOwner: TComponent);

TRxLookupControl


Functions


procedure ClearValue;


destructor Destroy;


function Locate(const SearchField: TField; const AValue: string; Exact: Boolean): Boolean;


procedure ResetField;

and (FDisplayField.DataType = ftString


procedure Change;


function GetPicture(Current, Empty: Boolean; var TextMargin: Integer): TGraphic;


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


function CanModify: Boolean;


procedure CheckDataLinkActiveChanged;

if FDataLink.Active and FDataLink.DataSet.IsLinkedTo(LookupSource) then _DBError(SCircularDataLink);


procedure CheckNotCircular;


procedure CheckNotFixed;


procedure DataLinkActiveChanged;


procedure DataLinkRecordChanged(Field: TField);


function DefaultTextHeight: Integer;


procedure DisplayValueChanged;


procedure DrawPicture(Canvas: TCanvas; Rect: TRect; Image: TGraphic);


function EmptyRowVisible: Boolean;


function GetBorderSize: Integer;

if FValue <> S then Change;


function GetDataSource: TDataSource;


function GetField: TField;


function GetItemHeight: Integer;


function GetKeyValue: Variant;


function GetLookupField: string;


function GetLookupSource: TDataSource;


function GetReadOnly: Boolean;


function GetTextHeight: Integer;


function ItemHeightStored: Boolean;


procedure KeyValueChanged;


procedure ListLinkActiveChanged;


procedure ListLinkDataChanged;


function LocateDisplay: Boolean;


function LocateKey: Boolean;


procedure ProcessSearchKey(Key: Char);


procedure SelectKeyValue(const Value: string);


procedure SetDataFieldName(const Value: string);


procedure SetDataSource(Value: TDataSource);


procedure SetDisplayEmpty(const Value: string);


procedure SetDisplayValue(const Value: string);


procedure SetEmptyItemColor(Value: TColor);


procedure SetItemHeight(Value: Integer);

Max(GetTextHeight, FItemHeight);


procedure SetKeyValue(const Value: Variant);


procedure SetListStyle(Value: TLookupListStyle);


procedure SetLookupDisplay(const Value: string);


procedure SetLookupField(const Value: string);


procedure SetLookupMode(Value: Boolean);


procedure SetLookupSource(Value: TDataSource);


procedure SetReadOnly(Value: Boolean);


procedure SetValue(const Value: string);


procedure SetValueKey(const Value: string);


function StoreEmpty: Boolean;


procedure UpdateDisplayEmpty(const Value: string);


procedure UpdateDisplayValue;


procedure UpdateKeyValue;


function ValueIsEmpty(const S: string): Boolean;


procedure WMGetDlgCode(var Message: TMessage);


procedure WMKillFocus(var Message: TMessage);


procedure WMSetFocus(var Message: TMessage);


Properties


property Field : TField


property DataField : string


property DataSource : TDataSource


property DisplayEmpty : string


property DisplayValue : string


property EmptyItemColor : TColor


property EmptyValue : string


property IgnoreCase : Boolean


property IndexSwitch : Boolean


property ItemHeight : Integer


property KeyValue : Variant


property ListStyle : TLookupListStyle


property LookupDisplay : string


property LookupDisplayIndex : Integer


property LookupField : string


property LookupSource : TDataSource


property ParentColor :


property ReadOnly : Boolean


property TabStop :


property Value : string


Events


event OnChange : TNotifyEvent


event OnGetImage : TGetImageEvent


Variables


FDataField : TField;


FDataFieldName : string;


FDataLink : TDataSourceLink;


FDisplayEmpty : string;


FDisplayField : TField;


FDisplayIndex : Integer;


FDisplayValue : string;


FEmptyItemColor : TColor;


FEmptyValue : string;


FFocused : Boolean;


FIgnoreCase : Boolean;


FIndexSwitch : Boolean;


FItemHeight : Integer;


FKeyField : TField;


FListActive : Boolean;


FListFields : TList;


FListStyle : TLookupListStyle;


FLocate : TLocateObject;


FLookupDisplay : string;


FLookupFieldName : string;


FLookupLink : TLookupSourceLink;


FLookupMode : Boolean;


FLookupSource : TDataSource;


FMasterField : TField;


FOnChange : TNotifyEvent;


FOnGetImage : TGetImageEvent;


FPopup : Boolean;


FSearchText : string;


FValue : string;