mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 14:43:51 +02: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;
|
||||
end;
|
||||
|
||||
function TButtonControl.UseOnChangeIsStored: boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TButtonControl.GetChecked: Boolean;
|
||||
begin
|
||||
GetChecked := False;
|
||||
@ -67,8 +62,8 @@ end;
|
||||
constructor TButtonControl.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
FUseOnChange:=DefaultButtonControlUseOnChange;
|
||||
ControlStyle:=ControlStyle-csMultiClicks-[csAcceptsControls,csCaptureMouse];
|
||||
FUseOnChange := False;
|
||||
ControlStyle := ControlStyle-csMultiClicks-[csAcceptsControls,csCaptureMouse];
|
||||
end;
|
||||
|
||||
{ TButtonActionLink }
|
||||
|
@ -148,7 +148,7 @@ begin
|
||||
TCustomAction(Action).Checked := FState = cbChecked;
|
||||
ApplyChanges;
|
||||
DoOnChange;
|
||||
if (not UseOnChange) and (not ClicksDisabled) then
|
||||
if (not ClicksDisabled) then
|
||||
inherited Click;
|
||||
end;
|
||||
end;
|
||||
|
@ -1004,7 +1004,6 @@ type
|
||||
FClicksDisabled: Boolean;
|
||||
FUseOnChange: boolean;
|
||||
function IsCheckedStored: boolean;
|
||||
function UseOnChangeIsStored: boolean;
|
||||
protected
|
||||
fLastCheckedOnChange: boolean;
|
||||
function GetChecked: Boolean; virtual;
|
||||
@ -1016,7 +1015,7 @@ type
|
||||
protected
|
||||
property Checked: Boolean read GetChecked write SetChecked stored IsCheckedStored default False;
|
||||
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;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
@ -1427,9 +1426,6 @@ type
|
||||
property OptimalFill;
|
||||
end;
|
||||
|
||||
var
|
||||
DefaultButtonControlUseOnChange: boolean;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
@ -1486,8 +1482,5 @@ end;
|
||||
|
||||
{$I customstatictext.inc}
|
||||
|
||||
initialization
|
||||
DefaultButtonControlUseOnChange:=false;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user