mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 13:28:59 +01:00
lcl: start removal of TButtonControl.UseOnChange
git-svn-id: trunk@17738 -
This commit is contained in:
parent
8e2de35c0a
commit
3d0838c488
@ -21,11 +21,6 @@ begin
|
|||||||
// or not TButtonActionLink(ActionLink).IsCheckedLinked;
|
// or not TButtonActionLink(ActionLink).IsCheckedLinked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TButtonControl.UseOnChangeIsStored: boolean;
|
|
||||||
begin
|
|
||||||
Result:=true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TButtonControl.GetChecked: Boolean;
|
function TButtonControl.GetChecked: Boolean;
|
||||||
begin
|
begin
|
||||||
GetChecked := False;
|
GetChecked := False;
|
||||||
@ -67,8 +62,8 @@ end;
|
|||||||
constructor TButtonControl.Create(TheOwner: TComponent);
|
constructor TButtonControl.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
FUseOnChange:=DefaultButtonControlUseOnChange;
|
FUseOnChange := False;
|
||||||
ControlStyle:=ControlStyle-csMultiClicks-[csAcceptsControls,csCaptureMouse];
|
ControlStyle := ControlStyle-csMultiClicks-[csAcceptsControls,csCaptureMouse];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TButtonActionLink }
|
{ TButtonActionLink }
|
||||||
|
|||||||
@ -148,7 +148,7 @@ begin
|
|||||||
TCustomAction(Action).Checked := FState = cbChecked;
|
TCustomAction(Action).Checked := FState = cbChecked;
|
||||||
ApplyChanges;
|
ApplyChanges;
|
||||||
DoOnChange;
|
DoOnChange;
|
||||||
if (not UseOnChange) and (not ClicksDisabled) then
|
if (not ClicksDisabled) then
|
||||||
inherited Click;
|
inherited Click;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -1004,7 +1004,6 @@ type
|
|||||||
FClicksDisabled: Boolean;
|
FClicksDisabled: Boolean;
|
||||||
FUseOnChange: boolean;
|
FUseOnChange: boolean;
|
||||||
function IsCheckedStored: boolean;
|
function IsCheckedStored: boolean;
|
||||||
function UseOnChangeIsStored: boolean;
|
|
||||||
protected
|
protected
|
||||||
fLastCheckedOnChange: boolean;
|
fLastCheckedOnChange: boolean;
|
||||||
function GetChecked: Boolean; virtual;
|
function GetChecked: Boolean; virtual;
|
||||||
@ -1016,7 +1015,7 @@ type
|
|||||||
protected
|
protected
|
||||||
property Checked: Boolean read GetChecked write SetChecked stored IsCheckedStored default False;
|
property Checked: Boolean read GetChecked write SetChecked stored IsCheckedStored default False;
|
||||||
property ClicksDisabled: Boolean read FClicksDisabled write FClicksDisabled;
|
property ClicksDisabled: Boolean read FClicksDisabled write FClicksDisabled;
|
||||||
property UseOnChange: boolean read FUseOnChange write FUseOnChange stored UseOnChangeIsStored;
|
property UseOnChange: boolean read FUseOnChange write FUseOnChange stored False default False;
|
||||||
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
property OnChange: TNotifyEvent read FOnChange write FOnChange;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
@ -1427,9 +1426,6 @@ type
|
|||||||
property OptimalFill;
|
property OptimalFill;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
|
||||||
DefaultButtonControlUseOnChange: boolean;
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -1486,8 +1482,5 @@ end;
|
|||||||
|
|
||||||
{$I customstatictext.inc}
|
{$I customstatictext.inc}
|
||||||
|
|
||||||
initialization
|
|
||||||
DefaultButtonControlUseOnChange:=false;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user