tactionlist

Why doesn't OnUpdate trigger for invisible components [duplicate]

眉间皱痕 提交于 2019-12-22 18:17:31
问题 This question already has answers here : How can I use an action to determine a control's visibility? (3 answers) Closed 5 years ago . When I make a component invisible by setting the connected TAction to invisible, the onupdate event will not trigger anymore. To recreate, do the following. Create a new VCL forms application Drop a button, a checkbox and an actionlist on the form. Create a new action, and connect the button to it. Write the following code for the actions OnExecute and

Why doesn't OnUpdate trigger for invisible components [duplicate]

吃可爱长大的小学妹 提交于 2019-12-06 11:28:06
This question already has answers here : How can I use an action to determine a control's visibility? (3 answers) Closed 5 years ago . When I make a component invisible by setting the connected TAction to invisible, the onupdate event will not trigger anymore. To recreate, do the following. Create a new VCL forms application Drop a button, a checkbox and an actionlist on the form. Create a new action, and connect the button to it. Write the following code for the actions OnExecute and OnUpdate event: procedure TForm1.Action1Execute(Sender: TObject); begin ShowMessage('Test'); end; procedure