Class XbpMenuBar() Foundation
Class function of the XbpMenuBar class.
The XbpMenubar class provides objects which display and manage horizontal menus (menu bars). A menu bar is displayed within a window and is the general access point into the menu system. The menu system can be used to control the program running within the window. The individual items of the menu bar are generally used to access submenus. These submenus are managed by objects of the XbpMenu class.
The pattern for using Xbase Parts normally includes the methods :new() and :create(). When creating menu bar objects there is an additional, easier way to generate XbpMenuBar objects. This is based on the fact that a menu bar must always be installed in a window. For this reason the XbpCrt and XbpDialog classes both include the method :menuBar() that returns a fully functional XbpMenuBar object that is already installed in the window.
After the XbpMenubar object is created, the items of the menu system must be added using the :addItem() method. If they are used, submenus (objects of the XbpMenu class) must be separately created.
The window area in which a menubar object is displayed is maintained automatically by the operating system. Consequently, most member variables and methods inherited from base class XbpWindow have no effect on menubar objects and should not be used.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.