29.1 Overview

Menuitem class can be used to create a single menu item. As such menuitems must always be embedded inside a <menu> tag which in turn is usually embedded inside a <menubar> tag. See Menubar class for details.

Please note that the XML tag for menuitem class is just <item> and not <menuitem> when creating menu items that are embedded inside a <menu> tree. When creating isolated menu items that aren't embedded inside a <menu> tree, you have to use <menuitem>, though because otherwise RapaGUI wouldn't be able to know which class you are referring to since <item> is used by many different classes.

If you do not specify a title for the menuitem, a separator item will be created. This is useful to group certain menuitems together which results in a more readable menu layout.

See Menubar class for an example.

Show TOC