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 }
|
||||
|
||||
procedure TRxDBDateEdit.DoCheckEnable;
|
||||
var
|
||||
F: Boolean;
|
||||
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;
|
||||
|
||||
function TRxDBDateEdit.GetDataField: string;
|
||||
|
@ -72,11 +72,13 @@ type
|
||||
private
|
||||
FHighlighter: TRxTextHolderHighlighter;
|
||||
FItems:TRxTextHolderItems;
|
||||
FOnExpandMacros: TNotifyEvent;
|
||||
function GetText(ACaption: string): string;
|
||||
procedure SetItems(AValue: TRxTextHolderItems);
|
||||
procedure SetText(ACaption: string; AValue: string);
|
||||
protected
|
||||
procedure AssignTo(Dest: TPersistent); override;
|
||||
procedure BeforeExpandMacros; virtual;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -85,6 +87,7 @@ type
|
||||
published
|
||||
property Highlighter: TRxTextHolderHighlighter read FHighlighter write FHighlighter;
|
||||
property Items:TRxTextHolderItems read FItems write SetItems;
|
||||
property OnExpandMacros: TNotifyEvent read FOnExpandMacros write FOnExpandMacros;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -146,6 +149,11 @@ begin
|
||||
inherited AssignTo(Dest);
|
||||
end;
|
||||
|
||||
procedure TRxTextHolder.BeforeExpandMacros;
|
||||
begin
|
||||
if Assigned(FOnExpandMacros) then FOnExpandMacros(Self);
|
||||
end;
|
||||
|
||||
constructor TRxTextHolder.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
|
Reference in New Issue
Block a user