mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 17:07:39 +01:00
LCL: TCUstomCheckBox: change Action.Checked on LM_CHANGED
git-svn-id: trunk@41681 -
This commit is contained in:
parent
b8c31f0f08
commit
b2aea83c77
@ -49,6 +49,8 @@ end;
|
||||
procedure TCustomCheckBox.DoChange(var Msg);
|
||||
begin
|
||||
FState := RetrieveState;
|
||||
if Action is TCustomAction then
|
||||
TCustomAction(Action).Checked := FState = cbChecked;
|
||||
DoClickOnChange;
|
||||
end;
|
||||
|
||||
@ -132,10 +134,10 @@ begin
|
||||
FState := cbChecked
|
||||
else
|
||||
FState := cbUnChecked;
|
||||
//debugln('TCustomCheckBox.DoChange ',dbgsname(Self),' ',dbgs(ord(FState)));
|
||||
//debugln('TCustomCheckBox.SetChecked ',dbgsname(Self),' ',dbgs(ord(FState)));
|
||||
if FState <> OldState then
|
||||
begin
|
||||
if Assigned(Action) and (Action is TCustomAction) then
|
||||
if Action is TCustomAction then
|
||||
TCustomAction(Action).Checked := FState = cbChecked;
|
||||
ApplyChanges;
|
||||
//some widgetsets (gtk*) does not allow to uncheck a radio button
|
||||
|
||||
Loading…
Reference in New Issue
Block a user