{
OnExecute example
When a client component or control is clicked, the OnExecute event occurs for it’s associated action. For example, the following code illustrates the OnExecute event handler for an action that toggles the visibility of a toolbar when the action is executed. This example requires a TActionList (with one TAction) and a TToolBar on a form.
} 
void __fastcall TForm1::Action1Execute(TObject *Sender)
{
     // Toggle Toolbar1's visibility 
     ToolBar1->Visible = !ToolBar1->Visible;
} 
