lcl: return DataLink on CM_GETDATALINK (issue #0001410)

git-svn-id: trunk@14741 -
This commit is contained in:
paul 2008-04-03 01:33:43 +00:00
parent e94a7220c4
commit 693bccca27
13 changed files with 75 additions and 1 deletions

View File

@ -135,6 +135,7 @@ Type
procedure SetDataField(Value: string);
procedure SetDataSource(Value: TDataSource);
function IsReadOnly: boolean;
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure SetReadOnly(Value: Boolean); override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
@ -220,6 +221,7 @@ Type
procedure SetDataField(Value: string);
procedure SetDataSource(Value: TDataSource);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
@ -273,6 +275,7 @@ Type
procedure SetDataField(Value: string);
procedure SetDataSource(Value: TDataSource);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
@ -353,6 +356,7 @@ Type
procedure SetReadOnly(const AValue: Boolean);
procedure SetValue(const AValue: string);
procedure SetValues(const AValue: TStrings);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure Change; virtual;
procedure Notification(AComponent: TComponent;
@ -417,6 +421,7 @@ Type
procedure SetValueCheck(const AValue: string);
procedure SetValueUncheck(const AValue: string);
function ValueEqualsField(const AValue, AFieldText: string): boolean;
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
function GetFieldCheckState: TCheckBoxState; virtual;
procedure DataChange(Sender: TObject); virtual;
@ -484,6 +489,7 @@ Type
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure SetReadOnly(const AValue: Boolean);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure DataChange(Sender: TObject); virtual;
procedure ActiveChange(Sender: TObject); //virtual;
@ -570,6 +576,7 @@ Type
procedure SetAutoDisplay(const AValue: Boolean);
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure SetReadOnly(AValue: Boolean); override;
function WordWrapIsStored: boolean; override;
@ -632,6 +639,7 @@ Type
function GetField: TField;
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure DataChange(Sender: TObject); virtual;
procedure Loaded; override;
@ -701,6 +709,7 @@ Type
procedure SetDataField(const AValue: string);
procedure SetDataSource(const AValue: TDataSource);
procedure SetReadOnly(const AValue: Boolean);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
@ -747,6 +756,8 @@ Type
{ TDBCalender }
{ TDBCalendar }
TDBCalendar = class(TCalendar)
FDataLink: TFieldDataLink;
@ -766,6 +777,7 @@ Type
procedure SetDataField(Value: string);
procedure SetDataSource(Value: TDataSource);
procedure UpdateDate(const AValue: string);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure Loaded; override;
procedure Notification(AComponent: TComponent;
@ -857,6 +869,7 @@ type
procedure SetHints(const AValue: TStrings);
procedure SetShowButtonHints(const AValue: boolean);
procedure SetVisibleButtons(const AValue: TDBNavButtonSet);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
Buttons: array[TDBNavButtonType] of TDBNavButton;
procedure DataChanged; virtual;

View File

@ -354,6 +354,7 @@ type
procedure ToggleSelectedRow;
procedure SelectRecord(AValue: boolean);
procedure GetScrollbarParams(out aRange, aPage, aPos: Integer);
procedure CMGetDataLink(var Message: TLMessage); message CM_GETDATALINK;
protected
procedure AdjustDefaultRowHeight; override;
procedure AddAutomaticColumns;
@ -2695,6 +2696,11 @@ begin
end;
end;
procedure TCustomDBGrid.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TCustomDBGrid.AdjustDefaultRowHeight;
begin
if not (gfDefRowHeightChanged in GridFlags) then begin

View File

@ -96,6 +96,11 @@ begin
inherited date := AValue;
end;
procedure TDBCalendar.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
{ Protected Methods}
procedure TDBCalendar.Loaded;
begin

View File

@ -163,6 +163,11 @@ begin
Result:=AnsiCompareText(AValue,AFieldText)=0;
end;
procedure TDBCheckBox.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
constructor TDBCheckBox.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);

View File

@ -68,6 +68,11 @@ begin
FDataLink.ReadOnly:=AValue;
end;
procedure TDBComboBox.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBComboBox.DataChange(Sender: TObject);
begin

View File

@ -144,6 +144,11 @@ begin
UpdateButtons;
end;
procedure TDBCustomNavigator.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBCustomNavigator.DataChanged;
var
PriorEnable, NextEnable: Boolean;

View File

@ -130,6 +130,11 @@ begin
result := (Field=nil) or Field.ReadOnly;
end;
procedure TDBEdit.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
{ Protected Methods}
procedure TDBEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin

View File

@ -41,6 +41,11 @@ begin
FDataLink.DataSource:=AValue;
end;
procedure TDBGroupBox.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBGroupBox.DataChange(Sender: TObject);
begin
if FDataLink.Field<>nil then

View File

@ -68,6 +68,11 @@ begin
FDataLink.ReadOnly:=AValue;
end;
procedure TDBImage.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBImage.Notification(AComponent: TComponent; Operation: TOperation);
begin
inherited Notification(AComponent, Operation);

View File

@ -109,6 +109,11 @@ begin
FDataLink.DataSource := Value;
end;
procedure TDBListBox.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
{ Protected Methods}
procedure TDBListBox.KeyDown(var Key: Word; Shift: TShiftState);
begin

View File

@ -56,6 +56,11 @@ begin
AValue.FreeNotification(Self);
end;
procedure TDBMemo.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBMemo.SetReadOnly(AValue: Boolean);
begin
inherited;

View File

@ -87,6 +87,11 @@ begin
DataChange(Self);
end;
procedure TDBRadioGroup.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
procedure TDBRadioGroup.Change;
begin
if Assigned(FOnChange) then FOnChange(Self);

View File

@ -64,6 +64,11 @@ begin
FDataLink.DataSource := Value;
end;
procedure TDBText.CMGetDataLink(var Message: TLMessage);
begin
Message.Result := PtrUInt(FDataLink);
end;
{ Protected Methods}
procedure TDBText.Loaded;
begin