mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
LCL: added property TEditButton.ButtonHint from Alexs75
git-svn-id: trunk@12261 -
This commit is contained in:
parent
12625a722d
commit
392fe94bbb
@ -39,10 +39,12 @@ type
|
|||||||
FButton: TSpeedButton;
|
FButton: TSpeedButton;
|
||||||
FButtonNeedsFocus: Boolean;
|
FButtonNeedsFocus: Boolean;
|
||||||
FOnButtonClick : TNotifyEvent;
|
FOnButtonClick : TNotifyEvent;
|
||||||
|
function GetButtonHint: TTranslateString;
|
||||||
function GetButtonWidth: Integer;
|
function GetButtonWidth: Integer;
|
||||||
function GetDirectInput: Boolean;
|
function GetDirectInput: Boolean;
|
||||||
function GetFlat: Boolean;
|
function GetFlat: Boolean;
|
||||||
Procedure CheckButtonVisible;
|
Procedure CheckButtonVisible;
|
||||||
|
procedure SetButtonHint(const AValue: TTranslateString);
|
||||||
procedure SetButtonNeedsFocus(const AValue: Boolean);
|
procedure SetButtonNeedsFocus(const AValue: Boolean);
|
||||||
procedure SetButtonWidth(const AValue: Integer);
|
procedure SetButtonWidth(const AValue: Integer);
|
||||||
procedure SetDirectInput(const AValue: Boolean);
|
procedure SetDirectInput(const AValue: Boolean);
|
||||||
@ -70,6 +72,7 @@ type
|
|||||||
property NumGlyphs : Integer read GetNumGlyphs write SetNumGlyphs;
|
property NumGlyphs : Integer read GetNumGlyphs write SetNumGlyphs;
|
||||||
property OnButtonClick : TNotifyEvent read FOnButtonClick write FOnButtonClick;
|
property OnButtonClick : TNotifyEvent read FOnButtonClick write FOnButtonClick;
|
||||||
property Button: TSpeedButton read FButton;
|
property Button: TSpeedButton read FButton;
|
||||||
|
property ButtonHint: TTranslateString read GetButtonHint write SetButtonHint;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -91,6 +94,7 @@ type
|
|||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property ButtonOnlyWhenFocused;
|
property ButtonOnlyWhenFocused;
|
||||||
property ButtonWidth;
|
property ButtonWidth;
|
||||||
|
property ButtonHint;
|
||||||
property CharCase;
|
property CharCase;
|
||||||
property Color;
|
property Color;
|
||||||
property Ctl3D;
|
property Ctl3D;
|
||||||
@ -534,6 +538,11 @@ begin
|
|||||||
Result:=FButton.Width;
|
Result:=FButton.Width;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomEditButton.GetButtonHint: TTranslateString;
|
||||||
|
begin
|
||||||
|
Result:=FButton.Hint;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCustomEditButton.GetDirectInput: Boolean;
|
function TCustomEditButton.GetDirectInput: Boolean;
|
||||||
begin
|
begin
|
||||||
Result := not ReadOnly;
|
Result := not ReadOnly;
|
||||||
@ -554,6 +563,11 @@ begin
|
|||||||
(Visible and (Focused or not FButtonNeedsFocus));
|
(Visible and (Focused or not FButtonNeedsFocus));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomEditButton.SetButtonHint(const AValue: TTranslateString);
|
||||||
|
begin
|
||||||
|
FButton.Hint:=AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomEditButton.SetButtonNeedsFocus(const AValue: Boolean);
|
procedure TCustomEditButton.SetButtonNeedsFocus(const AValue: Boolean);
|
||||||
begin
|
begin
|
||||||
If FButtonNeedsFocus<>AValue then
|
If FButtonNeedsFocus<>AValue then
|
||||||
|
Loading…
Reference in New Issue
Block a user