Represents a menu bar component.
The MenuBar component represents a menu structure for containers. The menu is composed of MenuItem objects that represent the individual menu commands in the menu structure. Each MenuItem can be a command for your application or a parent menu for other submenu items.
For applications that will have support for multiple languages, you can use the RightToLeft property to display the text of the menu from right to left to support languages such as Arabic.
For a full list of properties, methods and events see the API documentation.
The MenuBar component can be added to any container in Wisej. This includes Forms, Pages, FlowLayoutPanels, and more.
When set, the AutoOverflow property will automatically shown an icon when the listed MenuItems overflow off of the container.
Class name
"wisej.web.MenuBar", "wiseej.web.menu.MenuBar".
Theme appearance
Child components
"item" is the menu item, "overflow" is the overflow icon, when applicable. "separator" is the separator appearance.
Source code
"menubar", see .
.
Represents an individual link item that is displayed within a MainMenu or ContextMenu.
The LinkMenuItem, when clicked, will navigate to the location specified in the HRef property.
In order for a LinkMenuItem to be displayed, you must add it to a MainMenu or ContextMenu.
The LinkMenuItem class provides properties that enable you to configure the appearance and functionality of a link menu item. To display a check mark next to a link menu item, use the Checked property. The Shortcut property can be used to define a keyboard combination that can be pressed to select the menu item.
For LinkMenuItem objects displayed in a Multiple Document Interface (MDI) application, you can use the MergeMenu method to merge the menus of an MDI parent for with that of its child forms to create a consolidated menu structure. Because a LinkMenuItem cannot be reused in multiple locations at the same time, such as in a MainMenu and a ContextMenu, you can use the CloneMenu method to create a copy of a LinkMenuItem for use in another location.
The Popup event enables you to perform tasks before a menu is displayed. For example, you can create an event handler for this event to display or hide menu items based on the state of your code. The Select event enables you to perform tasks such as providing detailed help for your application's menu items when the user places the mouse pointer over a menu item.
For a full list of properties, methods and events see the API documentation.
Class name
"wisej.web.menu.MenuItem"
Theme appearance
"item", see .
Child components
"icon" is the item's icon, if applicable.
Source code
Represents an individual item that is displayed within a MainMenu or ContextMenu.
In order for a MenuItem to be displayed, you must add it to a MainMenu, MenuBar, or ContextMenu. To create submenus, you can add MenuItem objects to the MenuItems property of the parent MenuItem.
The MenuItem class provides properties that enable you to configure the appearance and functionality of a menu item. To display a check mark next to a menu item, use the Checked property. You can use this feature to identify a menu item that is selected in a list of mutually exclusive menu items. For example, if you have a set of menu items for setting the color of text in a TextBox control, you can use the Checked property to identify which color is currently selected. The Shortcut property can be used to define a keyboard combination that can be pressed to select the menu item.
For MenuItem objects displayed in a Multiple Document Interface (MDI) application, you can use the MergeMenu method to merge the menus of an MDI parent for with that of its child forms to create a consolidated menu structure. Because a MenuItem cannot be reused in multiple locations at the same time, such as in a MainMenu and a ContextMenu, you can use the CloneMenu method to create a copy of a MenuItem for use in another location.
The Popup event enables you to perform tasks before a menu is displayed. For example, you can create an event handler for this event to display or hide menu items based on the state of your code. The Select event enables you to perform tasks such as providing detailed help for your application's menu items when the user places the mouse pointer over a menu item.
For a full list of properties, methods and events see the API documentation.
Class name
"wisej.web.menu.MenuItem"
Theme appearance
"item", see .
Child components
"icon" is the item's icon, if applicable.
Source code
Represents a context menu associated to a Control.
The ContextMenu class represents shortcut menus that can be displayed when the user clicks the right mouse button over a control or area of the form. Shortcut menus are typically used to combine different menu items from a MainMenu of a form that are useful for the user given the context of the application. For example, you can use a shortcut menu assigned to a TextBox control to provide menu items for changing the font of the text, finding text within the control, or Clipboard features for copying and pasting text. You can also display new MenuItem objects in a shortcut menu that are not located within a MainMenu to provide situation specific commands that are not appropriate for the MainMenu to display.
Typically, a shortcut menu is displayed when a user clicks the right mouse button over a control or the form itself. Visible controls and Form have a ContextMenu property that binds the ContextMenu class to the control that displays the shortcut menu. More than one control can use a ContextMenu. You can use the SourceControl property to determine which control last displayed the shortcut menu in order to perform tasks specific to the control or to modify the shortcut menu displayed for the control.
You might want to know when the shortcut menu is being displayed in order to set check marks, disable items, and perform other menu tasks before the menu is displayed to the user. You can handle the Popup event to determine when the shortcut menu is being displayed.
For a full list of properties, methods and events see the API documentation.
The ContextMenu can be reused and assigned to any control that supports the ContextMenu property.
The same ContextMenu instance is assigned to both the Button and ComboBox controls.
Class name
"wisej.web.menu.ContextMenu"
Theme appearance
Child components
"icon" is the item's icon, if applicable. "shortcut" is the item's shortcut. "arrow" is the **> **arrow icon.
Source code
Represents the menu structure of a form.
The MainMenu control represents the container for the menu structure of a form. A menu is composed of MenuItem objects that represent the individual menu commands in the menu structure. Each MenuItem can be a command for your application or a parent menu for other submenu items. To bind the MainMenu to the Form that will display it, assign the MainMenu to the Menu property of the Form.
For applications that will have support for multiple languages, you can use the RightToLeft property to display the text of the menu from right to left to support languages such as Arabic.
You can create different MainMenu objects to represent different menu structures for your form. If you want to reuse the menu structure contained in a specific MainMenu, you can use its CloneMenu method to create a copy. Once you have a copy of the menu structure, you can make the appropriate modifications for your new menu structure.
For a full list of properties, methods and events see the API documentation.
When set, the AutoOverflow property will automatically show an overflow icon when there are too many items to display in the menu.
LinkMenuItems provide a simple way to create menu items that open a specified URL.
Shortcut keys provide a method for users to activate frequently used menu items in your menu system and to provide keyboard access to your application for those users who do not have access to a mouse or other pointer device.
Menu Items can be added to a Form in the designer by dragging the MainMenu component from the Toolbox onto the Form. The MenuItems property can be expanded to add new members.
To programmatically add menu items to a form, see the example below.
Class name
"wisej.web.menu.MainMenu"
Theme appearance
Source code
"item", see .
"mainmenu", inherits from "menubar", see .