Description | Hierarchy | Fields | Methods | Properties |
type TGUIContextMenu = class(TGUIElement)
A GUI context menu.
![]() |
function AddItem(const Text: StringType; NCommandID: LongInt=-1; Enabled: Boolean = True; NHasSubMenu: Boolean = False; NChecked: Boolean = False; NAutoChecking: Boolean = False): LongWord; inline; |
![]() |
function FindItemWithCommandID(CommandID: LongInt; StartIndex: LongWord=0): LongInt; inline; |
![]() |
function GetItemAutoChecking(Index: LongWord): Boolean; inline; |
![]() |
function GetItemCommandID(Index: LongWord): LongInt; inline; |
![]() |
function GetItemText(Index: LongWord): StringType; inline; |
![]() |
function GetSubMenu(Index: LongWord): TGUIContextMenu; inline; |
![]() |
function InsertItem(Index: LongWord; const Text: StringType; NCommandID: LongInt=-1; Enabled: Boolean = True; NHasSubMenu: Boolean = False; NChecked: Boolean = False; NAutoChecking: Boolean = False): LongWord; inline; |
![]() |
function IsItemChecked(Index: LongWord): Boolean; inline; |
![]() |
function IsItemEnabled(Index: LongWord): Boolean; inline; |
![]() |
procedure AddSeparator; inline; |
![]() |
procedure RemoveAllItems; inline; |
![]() |
procedure RemoveItem(Index: LongWord); inline; |
![]() |
procedure SetEventParent(Parent: TGUIElement); inline; |
![]() |
procedure SetItemChecked(Index: LongWord; Enabled: Boolean); inline; |
![]() |
procedure SetItemCommandID(Index: LongWord; ID: LongInt); inline; |
![]() |
procedure SetItemEnabled(Index: LongWord; Enabled: Boolean); inline; |
![]() |
procedure SetItemText(Index: LongWord; const Text: StringType); inline; |
![]() |
property CloseAction: TGUIContextMenuCloseAction read GetCloseAction write SetCloseAction; |
![]() |
property ItemCount: LongWord read GetItemCount; |
![]() |
property SelectedItem: LongInt read GetSelectedItem; |
![]() |
function AddItem(const Text: StringType; NCommandID: LongInt=-1; Enabled: Boolean = True; NHasSubMenu: Boolean = False; NChecked: Boolean = False; NAutoChecking: Boolean = False): LongWord; inline; |
Adds a menu item. Parameters
Returnshe index of the new item. |
![]() |
function GetItemAutoChecking(Index: LongWord): Boolean; inline; |
Specifies whether the element changes its checked state when clicked. |
![]() |
function GetItemCommandID(Index: LongWord): LongInt; inline; |
Returns the command ID of a menu item. Parameters
|
![]() |
function GetItemText(Index: LongWord): StringType; inline; |
Returns the visible caption of a menu item. Parameters
|
![]() |
function GetSubMenu(Index: LongWord): TGUIContextMenu; inline; |
Returns a submenu. Parameters
ReturnsThe submenu or nil if there is no submenu. |
![]() |
function InsertItem(Index: LongWord; const Text: StringType; NCommandID: LongInt=-1; Enabled: Boolean = True; NHasSubMenu: Boolean = False; NChecked: Boolean = False; NAutoChecking: Boolean = False): LongWord; inline; |
Insert a menu item at specified position. Parameters
ReturnsThe index of the new item. |
![]() |
function IsItemChecked(Index: LongWord): Boolean; inline; |
Returns if a certain item is checked. |
![]() |
function IsItemEnabled(Index: LongWord): Boolean; inline; |
Returns if a certain item is enabled. |
![]() |
procedure AddSeparator; inline; |
Adds a separator item to the menu. |
![]() |
procedure RemoveAllItems; inline; |
Removes all menu items. |
![]() |
procedure RemoveItem(Index: LongWord); inline; |
Removes a single menu item. Parameters
|
![]() |
procedure SetEventParent(Parent: TGUIElement); inline; |
When an EventParent is set, it will receive events instead of the usual parent element. |
![]() |
procedure SetItemCommandID(Index: LongWord; ID: LongInt); inline; |
Sets the command id of a menu item. Parameters
|
![]() |
procedure SetItemEnabled(Index: LongWord; Enabled: Boolean); inline; |
Enables or disables a menu item. Parameters
|
![]() |
procedure SetItemText(Index: LongWord; const Text: StringType); inline; |
Sets the visible caption of a menu item. Parameters
|
![]() |
property CloseAction: TGUIContextMenuCloseAction read GetCloseAction write SetCloseAction; |
The closing behaviour of this menu. |
![]() |
property ItemCount: LongWord read GetItemCount; |
The count of items currently in the meun. |
![]() |
property SelectedItem: LongInt read GetSelectedItem; |
Contains the index of the currently selected item or -1 if none is selected. |