lcl: start removal of TButtonControl.UseOnChange

git-svn-id: trunk@17738 -
This commit is contained in:
paul 2008-12-09 02:29:24 +00:00
parent 8e2de35c0a
commit 3d0838c488
3 changed files with 4 additions and 16 deletions

View File

@ -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 }

View File

@ -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;

View File

@ -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.