MenuBar
Overview
Represents an object that contains a group of commands. Every command has an associated action, image and caption.
MenuBar implements the behavior of the SubMenu, MenuItem and Toolbar objects used by the ToolbarList to define the list of owners of the current MenuBar.
Location
- Reference: RemObjects.Hydra.dll
- Namespace: RemObjects.Hydra.Actions
- Ancestry: MenuItem | SubMenu | Toolbar | MenuBar
constructor
Creates a new instance of the class.
constructor
MenuBar()
Sub New()
constructor (String, String)
constructor(aName: String; aCaption: String)
MenuBar(String aName, String aCaption)
Sub New(aName As String, aCaption As String)
Parameters:
- aName:
- aCaption:
constructor (String, String, Int32)
constructor(aName: String; aCaption: String; aImageIndex: Int32)
MenuBar(String aName, String aCaption, Int32 aImageIndex)
Sub New(aName As String, aCaption As String, aImageIndex As Int32)
Parameters:
- aName:
- aCaption:
- aImageIndex:
constructor (String, String, Int32, Action)
constructor(aName: String; aCaption: String; aImageIndex: Int32; aAction: Action)
MenuBar(String aName, String aCaption, Int32 aImageIndex, Action aAction)
Sub New(aName As String, aCaption As String, aImageIndex As Int32, aAction As Action)
Parameters:
- aName:
- aCaption:
- aImageIndex:
- aAction:
Action (declared in MenuItem)
Gets or sets the action that is associated with this menu item.
property Action: Action read write;
Action Action { get; set; }
Property Action() As Action
Add (declared in SubMenu)
Adds specified MenuItem elements to the list of child menu items.
method Add(aMenuItem: MenuItem)
void Add(MenuItem aMenuItem)
Sub Add(aMenuItem As MenuItem)
Parameters:
- aMenuItem: Reference to the menu item.
Assign (declared in SubMenu)
Assigns all the properties of the specified MenuItem object to the current MenuItem.
method Assign(Src: Object)
void Assign(Object Src)
Sub Assign(Src As Object)
Parameters:
- Src: Source object.
Caption (declared in MenuItem)
Gets or sets the caption of the menu item.
property Caption: String read write;
String Caption { get; set; }
Property Caption() As String
Count (declared in SubMenu)
Gets the number of the child menu items.
property Count: Int32 read;
Int32 Count { get; }
ReadOnly Property Count() As Int32
GetMenuItemAsSubMenuAt (declared in SubMenu)
Gets the child MenuItem element in the specified position as a SubMenu element.
method GetMenuItemAsSubMenuAt(aIndex: Int32): SubMenu
SubMenu GetMenuItemAsSubMenuAt(Int32 aIndex)
Function GetMenuItemAsSubMenuAt(aIndex As Int32) As SubMenu
Parameters:
- aIndex: Index of the menu item.
GetMenuItemAt (declared in SubMenu)
Gets the child MenuItem element in the specified position.
method GetMenuItemAt(aIndex: Int32): MenuItem
MenuItem GetMenuItemAt(Int32 aIndex)
Function GetMenuItemAt(aIndex As Int32) As MenuItem
Parameters:
- aIndex: Index of the menu item.
ImageIndex (declared in MenuItem)
Gets or sets the index of the image that is associated with this menu item.
property ImageIndex: Int32 read write;
Int32 ImageIndex { get; set; }
Property ImageIndex() As Int32
Initialize protected (declared in SubMenu)
This method is called when item is initialized.
method Initialize
void Initialize()
Sub Initialize()
Items (declared in SubMenu)
Gets the list of the child menu items.
property Items: MenuItemList read;
MenuItemList Items { get; }
ReadOnly Property Items() As MenuItemList
MenuItems (declared in SubMenu)
Retuns a menu item in the specified position.
property MenuItems[aIndex: Int32]: MenuItem read write;
MenuItem MenuItems[Int32 aIndex] { get; set; }
Property MenuItems(aIndex As Int32) As MenuItem
Name (declared in MenuItem)
Gets or sets the name of the menu item.
property Name: String read write;
String Name { get; set; }
Property Name() As String
OwnerList (declared in Toolbar)
Gets or sets the OwnerList of the parent MenuItem.
property OwnerList: ToolbarList read write;
ToolbarList OwnerList { get; set; }
Property OwnerList() As ToolbarList
Parent (declared in MenuItem)
Gets the parent MenuItem object to the current MenuItem.
property Parent: MenuItem read write;
MenuItem Parent { get; set; }
Property Parent() As MenuItem
Remove (declared in SubMenu)
Removes specified MenuItem elements from the list.
method Remove(aMenuItem: MenuItem)
void Remove(MenuItem aMenuItem)
Sub Remove(aMenuItem As MenuItem)
Parameters:
- aMenuItem: Reference to a menu item.
Action (declared in MenuItem)
Gets or sets the action that is associated with this menu item.
property Action: Action read write;
Action Action { get; set; }
Property Action() As Action
Caption (declared in MenuItem)
Gets or sets the caption of the menu item.
property Caption: String read write;
String Caption { get; set; }
Property Caption() As String
Count (declared in SubMenu)
Gets the number of the child menu items.
property Count: Int32 read;
Int32 Count { get; }
ReadOnly Property Count() As Int32
ImageIndex (declared in MenuItem)
Gets or sets the index of the image that is associated with this menu item.
property ImageIndex: Int32 read write;
Int32 ImageIndex { get; set; }
Property ImageIndex() As Int32
Items (declared in SubMenu)
Gets the list of the child menu items.
property Items: MenuItemList read;
MenuItemList Items { get; }
ReadOnly Property Items() As MenuItemList
MenuItems (declared in SubMenu)
Retuns a menu item in the specified position.
property MenuItems[aIndex: Int32]: MenuItem read write;
MenuItem MenuItems[Int32 aIndex] { get; set; }
Property MenuItems(aIndex As Int32) As MenuItem
Name (declared in MenuItem)
Gets or sets the name of the menu item.
property Name: String read write;
String Name { get; set; }
Property Name() As String
OwnerList (declared in Toolbar)
Gets or sets the OwnerList of the parent MenuItem.
property OwnerList: ToolbarList read write;
ToolbarList OwnerList { get; set; }
Property OwnerList() As ToolbarList
Parent (declared in MenuItem)
Gets the parent MenuItem object to the current MenuItem.
property Parent: MenuItem read write;
MenuItem Parent { get; set; }
Property Parent() As MenuItem
constructor
Creates a new instance of the class.
constructor
MenuBar()
Sub New()
constructor (String, String)
constructor(aName: String; aCaption: String)
MenuBar(String aName, String aCaption)
Sub New(aName As String, aCaption As String)
Parameters:
- aName:
- aCaption:
constructor (String, String, Int32)
constructor(aName: String; aCaption: String; aImageIndex: Int32)
MenuBar(String aName, String aCaption, Int32 aImageIndex)
Sub New(aName As String, aCaption As String, aImageIndex As Int32)
Parameters:
- aName:
- aCaption:
- aImageIndex:
constructor (String, String, Int32, Action)
constructor(aName: String; aCaption: String; aImageIndex: Int32; aAction: Action)
MenuBar(String aName, String aCaption, Int32 aImageIndex, Action aAction)
Sub New(aName As String, aCaption As String, aImageIndex As Int32, aAction As Action)
Parameters:
- aName:
- aCaption:
- aImageIndex:
- aAction:
Add (declared in SubMenu)
Adds specified MenuItem elements to the list of child menu items.
method Add(aMenuItem: MenuItem)
void Add(MenuItem aMenuItem)
Sub Add(aMenuItem As MenuItem)
Parameters:
- aMenuItem: Reference to the menu item.
Assign (declared in SubMenu)
Assigns all the properties of the specified MenuItem object to the current MenuItem.
method Assign(Src: Object)
void Assign(Object Src)
Sub Assign(Src As Object)
Parameters:
- Src: Source object.
GetMenuItemAsSubMenuAt (declared in SubMenu)
Gets the child MenuItem element in the specified position as a SubMenu element.
method GetMenuItemAsSubMenuAt(aIndex: Int32): SubMenu
SubMenu GetMenuItemAsSubMenuAt(Int32 aIndex)
Function GetMenuItemAsSubMenuAt(aIndex As Int32) As SubMenu
Parameters:
- aIndex: Index of the menu item.
GetMenuItemAt (declared in SubMenu)
Gets the child MenuItem element in the specified position.
method GetMenuItemAt(aIndex: Int32): MenuItem
MenuItem GetMenuItemAt(Int32 aIndex)
Function GetMenuItemAt(aIndex As Int32) As MenuItem
Parameters:
- aIndex: Index of the menu item.
Initialize protected (declared in SubMenu)
This method is called when item is initialized.
method Initialize
void Initialize()
Sub Initialize()
Remove (declared in SubMenu)
Removes specified MenuItem elements from the list.
method Remove(aMenuItem: MenuItem)
void Remove(MenuItem aMenuItem)
Sub Remove(aMenuItem As MenuItem)
Parameters:
- aMenuItem: Reference to a menu item.
- MenuItemList Class