WidgetMenuBar Class
This class creates a horizontal menu bar.
WidgetMenuBar Class
This class inherits from WidgetMembers
WidgetMenuBar (Gui gui)
Constructor. Creates an empty menu bar.Arguments
- Gui gui - GUI, to which the menu bar will belong.
int addItem (string title, WidgetMenuBox menu)
Adds a menu with a given title.Arguments
- string title - Menu title.
- WidgetMenuBox menu - Menu.
Return value
Number of the added menu.void clear ()
Removes all menus from the menu bar.WidgetMenuBox getItemMenu (int item)
Returns the menu of a given item.Arguments
- int item - Item number in range from 0 to the total number of menu bar items.
Return value
Menu.string getItemText (int item)
Returns the title of a given item.Arguments
- int item - Item number.
Return value
Item title.int getNumItems ()
Returns the number of items in the menu bar.Return value
Number of items.void removeItem (int item)
Removes a given item from the menu bar.Arguments
- int item - Item number in range from 0 to the total number of menu bar items.
void setItemMenu (int item, WidgetMenuBox menu)
Sets a menu for a given item.Arguments
- int item - Item number in range from 0 to the total number of menu bar items.
- WidgetMenuBox menu - Menu.
void setItemText (int item, string title)
Sets a title for a given item.Arguments
- int item - Item number in range from 0 to the total number of menu bar items.
- string title - Menu title.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)