mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 12:27:13 +01:00
LazDataDesktop: Implemented display of memo field using DbGrid's option dgDisplayMemoText, issue #32683
git-svn-id: trunk@57443 -
This commit is contained in:
parent
d630c8aa14
commit
9cb09b6186
@ -404,6 +404,7 @@ Var
|
||||
begin
|
||||
ClearDisplay;
|
||||
P:=TDataFrame.Create(Self);
|
||||
P.DisplayMemoText := true; // TODO: implement a global option?
|
||||
P.TableName:=ATableName;
|
||||
P.Parent:=FDisplay;
|
||||
P.Align:=alClient;
|
||||
|
||||
@ -25,6 +25,8 @@ type
|
||||
{ private declarations }
|
||||
FTableName : String;
|
||||
FDataset : TDataset;
|
||||
function GetDisplayMemoText: Boolean;
|
||||
procedure SetDisplayMemoText(AValue: Boolean);
|
||||
public
|
||||
{ public declarations }
|
||||
procedure Checkbuttons;
|
||||
@ -42,6 +44,7 @@ type
|
||||
Procedure ExportData;
|
||||
Procedure CreateCode;
|
||||
Property ShowExtraButtons : Boolean Read GetExtra Write SetExtra;
|
||||
Property DisplayMemoText : Boolean Read GetDisplayMemoText Write SetDisplayMemoText;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -67,6 +70,22 @@ begin
|
||||
CreateCode;
|
||||
end;
|
||||
|
||||
function TDataFrame.GetDisplayMemoText: Boolean;
|
||||
begin
|
||||
result := (dgDisplayMemoText in FDBGrid.Options);
|
||||
end;
|
||||
|
||||
procedure TDataFrame.SetDisplayMemoText(AValue: Boolean);
|
||||
begin
|
||||
If AValue <> DisplayMemoText then
|
||||
begin
|
||||
If AValue then
|
||||
FDBGrid.Options := FDBGrid.Options + [dgDisplayMemoText]
|
||||
else
|
||||
FDBGrid.Options := FDBGrid.Options - [dgDisplayMemoText];
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDataFrame.GetExtra: Boolean;
|
||||
begin
|
||||
Result:=FExportSB.Visible;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user