TAction & TCheckBox lazarus / 31-LCL ---------------------------------------------------------------------- Blaazen · 2012-07-23 21:00 Hi, I try to synchronize TAction (AutoCheck=True) with other GUI components. It works well with TMenuItem (ShowAlwaysCheckable=True) and with TToolButton (Style=tbsCheck) on ToolBar. Their property Checked is set correctly by assigned Action. But it does not work with TCheckBox. Its Checked property is not "synchronized" but when I click it (Check or Uncheck), Action.Execute is triggered correctly, as expected. Do I have to initiate Checkbox's state manually or am I doing something bad ? Thanks for help. ---------------------------------------------------------------------- taazz · 2012-07-23 23:20 As far as I can see setting CheckBox1.Checked should also set the action1.Checked but the problem (as I see it) is that Setchecked is not called when you use the mouse and so the SetChecked method is not executed, on top of that action property and ActionChange method are the ones inherited from the TControl and you need to override ActionChange method to update the checked property when the action's checked is changed. In my opinion this should be reported in the bugs database, although the Actionchange method override seems easy enough to implement it needs to be implemented in TCustomCheckBox to avoid using the checked property and set the fstate directly to avoid a circular loop as for the changing with the mouse the source says it is handled by the wm_MouseUp message which is not handled by the component it self, I guess it is handled in the widgeset side of things and I haven't got any look on them yet.