RAD Studio VCL Reference
|
Specifies the menu item corresponding to the button.
property MenuItem: TMenuItem;
__property TMenuItem MenuItem;
Use MenuItem to get or set the menu item corresponding to the button.
C++ Examples:
/*
To create a toolbar that corresponds to an existing menu:
1 Drop a ToolBar on the form and add a ToolButton for each
top-level menu item you wish to create.
2 Set the MenuItem property of each ToolButton to correspond
to the top level menu items.
3 Set the Grouped property of each ToolButton to true.
4 Clear the Menu property of the Form (if it is assigned)
5 Set the Visible property on the ToolBar and ToolButtons to
true.
6 Set the ShowCaptions property on the ToolBar to true.
7 Set the MenuItem | Visible property of each ToolButton to
true.
*/
Delphi Examples:
{
To create a toolbar that corresponds to an existing menu:
1 Drop a ToolBar on the form and add a ToolButton for each top-level menu item you wish to create.
2 Set the MenuItem property of each ToolButton to correspond to the top level menu items.
3 Set the Grouped property of each ToolButton to true.
4 Clear the Menu property of the Form (if it is assigned)
5 Set the Visible property on the ToolBar and ToolButtons to true.
6 Set the ShowCaptions property on the ToolBar to true.
7 Set the MenuItem | Visible property of each ToolButton to true.
}
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|