IMenuModel Methods |
The IMenuModel type exposes the following members.
Name | Description | |
---|---|---|
![]() | AddCheckItem |
Add a check item to the menu.
|
![]() | AddItem |
Add an item to the menu.
|
![]() | AddRadioItem |
Add a radio item to the menu. Only a single item with the specified groupId can be checked at a time.
|
![]() | AddSeparator |
Add a separator to the menu.
|
![]() | AddSubMenu |
Add a sub-menu to the menu. The new sub-menu is returned.
|
![]() | Clear |
Remove all menu items. Can be used to disable the context menu. Returns true on success.
|
![]() | GetAccelerator |
Retrieves the keyboard accelerator for the specified commandId.
|
![]() | GetAcceleratorAt |
Retrieves the keyboard accelerator for the specified index.
|
![]() | GetCommandIdAt |
Returns the command id at the specified index or -1 if not found due to invalid range or the index being a separator.
|
![]() | GetGroupId |
Returns the group id for the specified commandId or -1 if invalid.
|
![]() | GetGroupIdAt |
Returns the group id at the specified index or -1 if invalid.
|
![]() | GetIndexOf |
Returns the index associated with the specified commandId or -1 if not found due to the command id not existing in the menu.
|
![]() | GetLabel |
Returns the label for the specified commandId or empty if not found.
|
![]() | GetLabelAt |
Returns the label at the specified index or empty if not found due to
invalid range or the index being a separator.
|
![]() | GetSubMenu |
Returns the IMenuModel for the specified commandId or null if invalid.
|
![]() | GetSubMenuAt |
Returns the IMenuModel at the specified index or empty if invalid.
|
![]() | GetType |
Returns the item type for the specified commandId.
|
![]() | GetTypeAt |
Returns the item type at the specified index.
|
![]() | HasAccelerator |
Returns true if the specified commandId has a keyboard accelerator assigned.
|
![]() | HasAcceleratorAt |
Returns true if the specified index has a keyboard accelerator assigned.
|
![]() | InsertCheckItemAt |
Insert a check item in the menu at the specified index.
|
![]() | InsertItemAt |
Insert an item in the menu at the specified index.
|
![]() | InsertRadioItemAt |
Insert a radio item in the menu at the specified index.
Only a single item with the specified groupId can be checked at a time.
|
![]() | InsertSeparatorAt |
Insert a separator in the menu at the specified index.
|
![]() | InsertSubMenuAt |
Insert a sub-menu in the menu at the specified index.
|
![]() | IsChecked |
Returns true if the specified commandId is checked. Only applies to check and radio items.
|
![]() | IsCheckedAt |
Returns true if the specified index is checked. Only applies to check and radio items.
|
![]() | IsEnabled |
Returns true if the specified commandId is enabled.
|
![]() | IsEnabledAt |
Returns true if the specified index is enabled.
|
![]() | IsVisible |
Returns true if the specified commandId is visible.
|
![]() | IsVisibleAt |
Returns true if the specified index is visible.
|
![]() | Remove |
Removes the item with the specified commandId.
|
![]() | RemoveAccelerator |
Remove the keyboard accelerator for the specified commandId.
|
![]() | RemoveAcceleratorAt |
Remove the keyboard accelerator at the specified index.
|
![]() | RemoveAt |
Removes the item at the specified index.
|
![]() | SetAccelerator |
Set the keyboard accelerator for the specified commandId.
|
![]() | SetAcceleratorAt |
Set the keyboard accelerator at the specified index. keyCode can be any key or character value.
|
![]() | SetChecked |
Check the specified commandId. Only applies to check and radio items.
|
![]() | SetCheckedAt |
Check the specified index. Only applies to check and radio items.
|
![]() | SetCommandIdAt |
Sets the command id at the specified index.
|
![]() | SetEnabled |
Change the enabled status of the specified commandId.
|
![]() | SetEnabledAt |
Change the enabled status at the specified index.
|
![]() | SetGroupId |
Sets the group id for the specified commandId.
|
![]() | SetGroupIdAt |
Sets the group id at the specified index.
|
![]() | SetLabel |
Sets the label for the specified commandId.
|
![]() | SetLabelAt |
Set the label at the specified index.
|
![]() | SetVisible |
Change the visibility of the specified commandId.
|
![]() | SetVisibleAt |
Change the visibility at the specified index.
|