IUP::Submenu - [GUI element] menu item that, when selected, opens another menu
Creates a menu item that, when selected, opens another menu.
$submenu = IUP::Submenu->new( TITLE=>"Name", child=>$menu_element );
child: (named parameter) optional child menu reference. Can be
undef or ommited.
Returns: the identifier of the created element, or
undef if an error occurs.
NOTE: You can pass to
CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
[Windows and GTK Only] (non inheritable)
Image name of the submenu image. In Windows, an item in a menu bar cannot have a check mark. Ignored if submenu in a menu bar. A recommended size would be 16x16 to fit the image in the menu item. In Windows, if larger than the check mark area it will be cropped.
Submenu Text. The "&" character can be used to define a mnemonic, the next character will be used as key. Use "&&" to show the "&" character instead on defining a mnemonic.
In Windows, returns the HMENU of the parent menu and it is actually created only when its child menu is mapped.
The following common attributes are also accepted:
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
Action generated when the submenu is highlighted.
The following common callbacks are also accepted:
In Motif and GTK, the text font will be affected by the dialog font when the menu is mapped.
The element IUP::Submenu is used in the following sample scripts:
The original doc: iupsubmenu.html