You've already forked lazarus-ccr
RxFPC:fix RxDBDateEdit button enabled
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6799 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -121,8 +121,12 @@ uses rxdateutil;
|
|||||||
{ TRxDBDateEdit }
|
{ TRxDBDateEdit }
|
||||||
|
|
||||||
procedure TRxDBDateEdit.DoCheckEnable;
|
procedure TRxDBDateEdit.DoCheckEnable;
|
||||||
|
var
|
||||||
|
F: Boolean;
|
||||||
begin
|
begin
|
||||||
Enabled:=FDataLink.Active and (FDataLink.Field<>nil) and (not FDataLink.Field.ReadOnly);
|
F:=FDataLink.Active and (FDataLink.Field<>nil) and (not FDataLink.Field.ReadOnly);
|
||||||
|
Enabled:=F;
|
||||||
|
Button.Enabled:=F;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxDBDateEdit.GetDataField: string;
|
function TRxDBDateEdit.GetDataField: string;
|
||||||
|
@ -72,11 +72,13 @@ type
|
|||||||
private
|
private
|
||||||
FHighlighter: TRxTextHolderHighlighter;
|
FHighlighter: TRxTextHolderHighlighter;
|
||||||
FItems:TRxTextHolderItems;
|
FItems:TRxTextHolderItems;
|
||||||
|
FOnExpandMacros: TNotifyEvent;
|
||||||
function GetText(ACaption: string): string;
|
function GetText(ACaption: string): string;
|
||||||
procedure SetItems(AValue: TRxTextHolderItems);
|
procedure SetItems(AValue: TRxTextHolderItems);
|
||||||
procedure SetText(ACaption: string; AValue: string);
|
procedure SetText(ACaption: string; AValue: string);
|
||||||
protected
|
protected
|
||||||
procedure AssignTo(Dest: TPersistent); override;
|
procedure AssignTo(Dest: TPersistent); override;
|
||||||
|
procedure BeforeExpandMacros; virtual;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -85,6 +87,7 @@ type
|
|||||||
published
|
published
|
||||||
property Highlighter: TRxTextHolderHighlighter read FHighlighter write FHighlighter;
|
property Highlighter: TRxTextHolderHighlighter read FHighlighter write FHighlighter;
|
||||||
property Items:TRxTextHolderItems read FItems write SetItems;
|
property Items:TRxTextHolderItems read FItems write SetItems;
|
||||||
|
property OnExpandMacros: TNotifyEvent read FOnExpandMacros write FOnExpandMacros;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -146,6 +149,11 @@ begin
|
|||||||
inherited AssignTo(Dest);
|
inherited AssignTo(Dest);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxTextHolder.BeforeExpandMacros;
|
||||||
|
begin
|
||||||
|
if Assigned(FOnExpandMacros) then FOnExpandMacros(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TRxTextHolder.Create(TheOwner: TComponent);
|
constructor TRxTextHolder.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
Reference in New Issue
Block a user