reckfellENGINE

PopupMenu

Popup command menu with separate indices, IDs and stored item states.

On this page
class PopupMenuReckfellSharpInherits Popup

Add commands through AddItem, AddCheckItem, AddRadioCheckItem or AddMultistateItem. MenuBar/MenuButton can open the window, but handle application actions in PopupMenu.IdPressed. The menu does not itself save projects or execute commands by label.

An index is a position in 0…ItemCount-1, including separators. ID is a separate command number. For ordinary additions id = -1 assigns the current index; later removal does not renumber IDs. AddSeparator stores -1 as -1. Use your own unique nonnegative IDs: duplicates are allowed, GetItemIndex returns the first, and activation substitutes the current index for a stored negative ID.

After RemoveItem or SetItemIndex, resolve the index again through GetItemIndex(id) and check for -1. Do not pass -1 to a getter to mean last item: most getters require ordinary indices. The reviewed SetItem* methods accept negative indices from the end, but ToggleItemChecked/ToggleItemMultistate and RemoveItem do not.

Activation emits IdPressed, then IndexPressed. Use one channel for executing actions to avoid duplicate execution. An IdPressed handler can already mutate the list, so IndexPressed is not a fresh lookup of that command after mutation. Programmatic flag/text setters do not activate items.

Check/radio describes appearance and stored state rather than automatic toggling. Activation does not change Checked, and radio items do not uncheck siblings. Update your model in IdPressed, then explicitly SetItemChecked on the required indices. Indeterminate is separate: ToggleItemChecked does not reset it; clear Indeterminate explicitly for ordinary binary choices.

Multistate storage is also separate from activation: call ToggleItemMultistate or SetItemMultistate in the handler. Validate maxStates > 0 and 0 ≤ state < maxStates yourself; reducing the maximum does not normalize current state.

ActivateItemByEvent directly matches a Shortcut/accelerator rather than performing full input delivery. Filter press/repeat when calling from your own handler: matching key releases can also activate accelerators. Disabled and ShortcutDisabled exclude an item. forGlobalOnly restricts Shortcut matching rather than excluding ordinary accelerators.

Clear() and Clear(false) remove records while retaining child submenus. Clear(true) detaches and schedules freeing submenus referenced by current records; previously retained children no longer referenced by items are not removed by that condition. Prefer AddSubmenuEntityItem/GetItemSubmenuEntity: this menu adopts a parentless submenu. Do not share one submenu between multiple owners.

HideOnItemSelection and HideOnCheckableItemSelection default to true, HideOnStateItemSelection to false. These hiding policies do not toggle state or confirm successful command execution. MenuChanged is also not universal observation of every mutation: SetItemAsSeparator, for example, does not emit it.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

PopupMenuConstructor
# PopupMenu
C#
public PopupMenu();

Creates an empty hidden menu. HideOnItemSelection/HideOnCheckableItemSelection enabled, HideOnStateItemSelection disabled. Adding records does not activate them.

Properties14

AllowSearchProperty
# AllowSearch
C#
public bool AllowSearch { get; set; }

Enables navigation by the initial letters of original item labels, default true. This navigates rather than executing commands or providing a filter field. This letter-navigation mode is unused while the menu search bar is visible.

HideOnCheckableItemSelectionProperty
# HideOnCheckableItemSelection
C#
public bool HideOnCheckableItemSelection { get; set; }

Hide on check/radio activation, default true. Does not toggle checked itself.

HideOnItemSelectionProperty
# HideOnItemSelection
C#
public bool HideOnItemSelection { get; set; }

Hide on ordinary command activation, default true. Does not enable/disable handler execution.

HideOnStateItemSelectionProperty
# HideOnStateItemSelection
C#
public bool HideOnStateItemSelection { get; set; }

Hide on multistate activation, default false. Does not modify state.

ItemCountProperty
# ItemCount
C#
public int ItemCount { get; set; }

Record count including separators. Setter requires ≥ 0; growth adds empty records with index-based IDs, shrinking discards the tail. Does not manage the lifetime of every child submenu.

PreferNativeMenuProperty
# PreferNativeMenu
C#
public bool PreferNativeMenu { get; set; }

If true, MenuBar will use native menu when supported. Note: If PopupMenu is linked to StatusIndicator, MenuBar, or another PopupMenu item it can use native menu regardless of this property, use PopupMenu.IsNativeMenu to check it.

SearchBarEnabledProperty
# SearchBarEnabled
C#
public bool SearchBarEnabled { get; set; }

Enables the menu filter field, default false. It appears at SearchBarMinItemCount; separators do not count toward the threshold. While the field is visible, AllowSearch letter navigation is unused. This configures the local menu rather than guaranteeing an equivalent OS-native field.

SearchBarFuzzySearchEnabledProperty
# SearchBarFuzzySearchEnabled
C#
public bool SearchBarFuzzySearchEnabled { get; set; }

Enables fuzzy matching in the search field, default true. false uses the matcher’s exact-token mode rather than promising byte-for-byte equality of the entire label. Search uses original item and submenu labels.

SearchBarFuzzySearchMaxMissesProperty
# SearchBarFuzzySearchMaxMisses
C#
public int SearchBarFuzzySearchMaxMisses { get; set; }

Fuzzy matcher miss allowance: integer 0 or greater, default 2. This configures matching rather than result count or a guaranteed Levenshtein distance.

SearchBarMinItemCountProperty
# SearchBarMinItemCount
C#
public int SearchBarMinItemCount { get; set; }

Minimum number of non-separator items needed to show the enabled search field. Must be 0 or greater; default 0. Does not remove records or change IDs.

ShrinkHeightProperty
# ShrinkHeight
C#
public bool ShrinkHeight { get; set; }

Fit the local popup height to its computed content minimum when preparing it, default true. false retains the requested height subject to window constraints. The setter does not itself open or resize an already displayed window.

ShrinkWidthProperty
# ShrinkWidth
C#
public bool ShrinkWidth { get; set; }

Fit the local popup width to its computed content minimum when preparing it, default true. false retains the requested width subject to window constraints. The setter does not itself open the menu.

SubmenuPopupDelayProperty
# SubmenuPopupDelay
C#
public float SubmenuPopupDelay { get; set; }

Hover submenu opening delay in seconds; default 0.2. A value ≤ 0 becomes 0.01; positive values below 0.01 are retained. Does not provide zero delay or trigger opening by itself.

SystemMenuIdProperty
# SystemMenuId
C#
public NativeMenu.SystemMenus SystemMenuId { get; set; }

If set to one of the values of NativeMenu.SystemMenus, this PopupMenu is bound to the special system menu. Only one PopupMenu can be bound to each special menu at a time.

Methods109

ActivateItemByEventbool
# ActivateItemByEvent
C#
public bool ActivateItemByEvent(InputEvent @event, bool forGlobalOnly = false);

Directly matches a Shortcut/accelerator and activates the first eligible item. Caller must filter press/echo; a matching release can also activate an accelerator. Respects Disabled and ShortcutDisabled. forGlobalOnly restricts Shortcuts rather than ordinary accelerators.

Parameters
NameTypeDefault
eventInputEvent—
forGlobalOnlyboolfalse
event

Non-null event; caller filters press/repeat before passing it.

forGlobalOnly

Restrict Shortcut matching to global ones; ordinary accelerators are not excluded.

Returns bool

true when a matching item was found and activated.

AddCheckItemvoid
# AddCheckItem
C#
public void AddCheckItem(string label, int id = -1, Key accel = Key.None);

Adds an initially unchecked checkbox item. Activation does not toggle checked; update the model and SetItemChecked in your handler.

Parameters
NameTypeDefault
labelstring—
idint-1
accelKeyKey.None
label

Adds an initially unchecked checkbox item. Activation does not toggle checked; update the model and SetItemChecked in your handler.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

accel

Adds an initially unchecked checkbox item. Activation does not toggle checked; update the model and SetItemChecked in your handler.

AddCheckShortcutvoid
# AddCheckShortcut
C#
public void AddCheckShortcut(Shortcut shortcut, int id = -1, bool global = false);

Adds a checkbox command with a shared Shortcut and a label from ResourceName. Initially unchecked; activation does not toggle checked. Update your model and call SetItemChecked in IdPressed. Echo repeats are disabled.

Parameters
NameTypeDefault
shortcutShortcut—
idint-1
globalboolfalse
shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

AddIconCheckItemvoid
# AddIconCheckItem
C#
public void AddIconCheckItem(Texture2D texture, string label, int id = -1, Key accel = Key.None);

Adds a checkbox command with the original label, shared icon and optional accelerator. Initially unchecked; activation does not toggle it. Use SetItemChecked in IdPressed. id = -1 assigns the current index.

Parameters
NameTypeDefault
textureTexture2D—
labelstring—
idint-1
accelKeyKey.None
texture

Shared icon Texture2D; the resource is not copied.

label

Original command label, separate from its ID and key binding.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

accel

Key with modifiers; Key.None disables the accelerator. Not a Shortcut object.

AddIconCheckShortcutvoid
# AddIconCheckShortcut
C#
public void AddIconCheckShortcut(Texture2D texture, Shortcut shortcut, int id = -1, bool global = false);

Adds a checkbox command with a shared icon and Shortcut; label is copied from ResourceName. Activation does not change checked; echo repeats are disabled. Set the state explicitly in IdPressed.

Parameters
NameTypeDefault
textureTexture2D—
shortcutShortcut—
idint-1
globalboolfalse
texture

Shared icon Texture2D; the resource is not copied.

shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

AddIconItemvoid
# AddIconItem
C#
public void AddIconItem(Texture2D texture, string label, int id = -1, Key accel = Key.None);

Adds an ordinary command with the original label and a shared Texture2D. accel sets a separate keyboard accelerator; Key.None disables it. id = -1 assigns the current index. This does not create a Shortcut resource or a checkable item.

Parameters
NameTypeDefault
textureTexture2D—
labelstring—
idint-1
accelKeyKey.None
texture

Shared icon Texture2D; the resource is not copied.

label

Original command label, separate from its ID and key binding.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

accel

Key with modifiers; Key.None disables the accelerator. Not a Shortcut object.

AddIconRadioCheckItemvoid
# AddIconRadioCheckItem
C#
public void AddIconRadioCheckItem(Texture2D texture, string label, int id = -1, Key accel = Key.None);

Adds a radio command with the original label, shared icon and optional accelerator. Initially unchecked; the application implements toggling and mutual exclusion. id = -1 assigns the current index.

Parameters
NameTypeDefault
textureTexture2D—
labelstring—
idint-1
accelKeyKey.None
texture

Shared icon Texture2D; the resource is not copied.

label

Original command label, separate from its ID and key binding.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

accel

Key with modifiers; Key.None disables the accelerator. Not a Shortcut object.

AddIconRadioCheckShortcutvoid
# AddIconRadioCheckShortcut
C#
public void AddIconRadioCheckShortcut(Texture2D texture, Shortcut shortcut, int id = -1, bool global = false);

Adds a radio command with a shared icon and Shortcut; label is copied from ResourceName. Activation neither changes checked nor clears neighboring radio flags; echo repeats are disabled.

Parameters
NameTypeDefault
textureTexture2D—
shortcutShortcut—
idint-1
globalboolfalse
texture

Shared icon Texture2D; the resource is not copied.

shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

AddIconShortcut2 overloads
# AddIconShortcut · 1/2
C#
public void AddIconShortcut(Texture2D texture, Shortcut shortcut, int id, bool global);

Short overload adds a command with allowEcho = false. Use the overload with allowEcho for an explicit repeat policy. Label is copied from ResourceName; global does not mean an OS-wide hotkey.

Parameters
NameTypeDefault
textureTexture2D—
shortcutShortcut—
idint—
globalbool—
texture

Shared icon Texture2D; the resource is not copied.

shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

# AddIconShortcut · 2/2
C#
public void AddIconShortcut(Texture2D texture, Shortcut shortcut, int id = -1, bool global = false, bool allowEcho = false);

Adds an ordinary command with an icon and a shared Shortcut. Label is copied from ResourceName; this is not a checkbox. global does not register an OS-wide hotkey. Repeats require allowEcho = true; default false. Icon and Shortcut resources are not copied.

Parameters
NameTypeDefault
textureTexture2D—
shortcutShortcut—
idint-1
globalboolfalse
allowEchoboolfalse
texture

Shared icon Texture2D; the resource is not copied.

shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

allowEcho

Allow repeated echo events; default false.

AddItemvoid
# AddItem
C#
public void AddItem(string label, int id = -1, Key accel = Key.None);

Adds a command with text, ID and optional accelerator. id = -1 assigns the current index; use a unique nonnegative ID for a stable command.

Parameters
NameTypeDefault
labelstring—
idint-1
accelKeyKey.None
label

Adds a command with text, ID and optional accelerator. id = -1 assigns the current index; use a unique nonnegative ID for a stable command.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

accel

Adds a command with text, ID and optional accelerator. id = -1 assigns the current index; use a unique nonnegative ID for a stable command.

AddMultistateItemvoid
# AddMultistateItem
C#
public void AddMultistateItem(string label, int maxStates, int defaultState = 0, int id = -1, Key accel = Key.None);

Adds an item with state count and initial state index. Validate maxStates > 0 and defaultState range. Activation does not automatically advance state.

Parameters
NameTypeDefault
labelstring—
maxStatesint—
defaultStateint0
idint-1
accelKeyKey.None
label

Adds an item with state count and initial state index. Validate maxStates > 0 and defaultState range. Activation does not automatically advance state.

maxStates

Adds an item with state count and initial state index. Validate maxStates > 0 and defaultState range. Activation does not automatically advance state.

defaultState

Adds an item with state count and initial state index. Validate maxStates > 0 and defaultState range. Activation does not automatically advance state.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

accel

Adds an item with state count and initial state index. Validate maxStates > 0 and defaultState range. Activation does not automatically advance state.

AddRadioCheckItemvoid
# AddRadioCheckItem
C#
public void AddRadioCheckItem(string label, int id = -1, Key accel = Key.None);

Adds an initially unchecked radio item. Does not create an exclusive group; clear other options yourself.

Parameters
NameTypeDefault
labelstring—
idint-1
accelKeyKey.None
label

Adds an initially unchecked radio item. Does not create an exclusive group; clear other options yourself.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

accel

Adds an initially unchecked radio item. Does not create an exclusive group; clear other options yourself.

AddRadioCheckShortcutvoid
# AddRadioCheckShortcut
C#
public void AddRadioCheckShortcut(Shortcut shortcut, int id = -1, bool global = false);

Adds a radio command with a shared Shortcut and a label from ResourceName. Initially unchecked; neither automatic toggling nor mutual exclusion with neighboring radio items is provided. Set the required states in IdPressed. Echo repeats are disabled.

Parameters
NameTypeDefault
shortcutShortcut—
idint-1
globalboolfalse
shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

AddSeparatorvoid
# AddSeparator
C#
public void AddSeparator(string label = "", int id = -1);

Adds a separator that occupies an index but is not an activation command. Stores id directly: -1 is not replaced with an index. Label is optional.

Parameters
NameTypeDefault
labelstring""
idint-1
label

Adds a separator that occupies an index but is not an activation command. Stores id directly: -1 is not replaced with an index. Label is optional.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

AddShortcut2 overloads
# AddShortcut · 1/2
C#
public void AddShortcut(Shortcut shortcut, int id, bool global);

Short overload adds a command with allowEcho = false. Use the overload with allowEcho for an explicit repeat policy. Label is copied from ResourceName; global does not mean an OS-wide hotkey.

Parameters
NameTypeDefault
shortcutShortcut—
idint—
globalbool—
shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

# AddShortcut · 2/2
C#
public void AddShortcut(Shortcut shortcut, int id = -1, bool global = false, bool allowEcho = false);

Adds an ordinary command with a shared Shortcut resource; initial label is copied from ResourceName. id = -1 assigns the current index; use a stable nonnegative ID for routing. global concerns menu shortcut handling rather than OS-wide registration outside the application. allowEcho permits repeats; default false. Handle the action in IdPressed.

Parameters
NameTypeDefault
shortcutShortcut—
idint-1
globalboolfalse
allowEchoboolfalse
shortcut

Non-null shared Shortcut with the required Events; ResourceName is copied into the initial item label.

id

Command ID; -1 assigns the current index. Prefer your own unique nonnegative ID.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

allowEcho

Allow repeated echo events; default false.

AddSubmenuEntityItemvoid
# AddSubmenuEntityItem
C#
public void AddSubmenuEntityItem(string label, PopupMenu submenu, int id = -1);

Adds an item referencing a PopupMenu. Submenu must be parentless or already a child of this menu; a parentless object is adopted. Keep a clear owner/item relationship.

Parameters
NameTypeDefault
labelstring—
submenuPopupMenu—
idint-1
label

Adds an item referencing a PopupMenu. Submenu must be parentless or already a child of this menu; a parentless object is adopted. Keep a clear owner/item relationship.

submenu

Adds an item referencing a PopupMenu. Submenu must be parentless or already a child of this menu; a parentless object is adopted. Keep a clear owner/item relationship.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

AddSubmenuItemvoid · Deprecated
# AddSubmenuItem
C#
public void AddSubmenuItem(string label, string submenu, int id = -1);

Adds an existing submenu by relative path. Prefer typed AddSubmenuEntityItem in the installed SDK; do not supply an arbitrary nonexistent menu name.

Parameters
NameTypeDefault
labelstring—
submenustring—
idint-1
label

Adds an existing submenu by relative path. Prefer typed AddSubmenuEntityItem in the installed SDK; do not supply an arbitrary nonexistent menu name.

submenu

Adds an existing submenu by relative path. Prefer typed AddSubmenuEntityItem in the installed SDK; do not supply an arbitrary nonexistent menu name.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

Clear2 overloads
# Clear · 1/2
C#
public void Clear();

Removes records and resets focus. No argument or false retains child submenus. true detaches and schedules freeing only submenus referenced by current items; does not free previously retained unreferenced children.

# Clear · 2/2
C#
public void Clear(bool freeSubmenus = false);

Removes records and resets focus. No argument or false retains child submenus. true detaches and schedules freeing only submenus referenced by current items; does not free previously retained unreferenced children.

Parameters
NameTypeDefault
freeSubmenusboolfalse
freeSubmenus

true detaches and schedules freeing currently referenced submenus; false retains them in the tree.

GetAllowSearchbool
# GetAllowSearch
C#
public bool GetAllowSearch();

Enables navigation by the initial letters of original item labels, default true. This navigates rather than executing commands or providing a filter field. This letter-navigation mode is unused while the menu search bar is visible.

Returns bool

Enables navigation by the initial letters of original item labels, default true. This navigates rather than executing commands or providing a filter field. This letter-navigation mode is unused while the menu search bar is visible.

GetFocusedItemint
# GetFocusedItem
C#
public int GetFocusedItem();

Returns the current highlight index, or -1. This is an index rather than a command ID or execution result.

Returns int

Returns the current highlight index, or -1. This is an index rather than a command ID or execution result.

GetItemAcceleratorKey
# GetItemAccelerator
C#
public Key GetItemAccelerator(int index);

Returns the stored accelerator Key rather than a Shortcut object.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns Key

Accelerator Key, or Key.None.

GetItemAutoTranslateModeEntity.AutoTranslateModeEnum
# GetItemAutoTranslateMode
C#
public Entity.AutoTranslateModeEnum GetItemAutoTranslateMode(int index);

Returns the stored translation policy, default Inherit, rather than whether a translation exists for this label.

Parameters
NameTypeDefault
indexint—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

Returns Entity.AutoTranslateModeEnum

Returns the stored translation policy, default Inherit, rather than whether a translation exists for this label.

GetItemCountint
# GetItemCount
C#
public int GetItemCount();

Record count including separators. Setter requires ≥ 0; growth adds empty records with index-based IDs, shrinking discards the tail. Does not manage the lifetime of every child submenu.

Returns int

Record count including separators.

GetItemIconTexture2D
# GetItemIcon
C#
public Texture2D GetItemIcon(int index);

Returns the shared Texture2D, or null. This is the original resource rather than a menu-sized copy. Requires an ordinary valid index.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

Returns Texture2D

Returns the shared Texture2D, or null. This is the original resource rather than a menu-sized copy. Requires an ordinary valid index.

GetItemIconMaxWidthint
# GetItemIconMaxWidth
C#
public int GetItemIconMaxWidth(int index);

Returns the stored item limit rather than drawn width or the effective theme limit. Default 0.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

Returns int

Returns the stored item limit rather than drawn width or the effective theme limit. Default 0.

GetItemIconModulateColor
# GetItemIconModulate
C#
public Color GetItemIconModulate(int index);

Returns the stored icon RGBA multiplier, white by default.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

Returns Color

Returns the stored icon RGBA multiplier, white by default.

GetItemIdint
# GetItemId
C#
public int GetItemId(int index);

Returns the stored ID at an existing index. Activation can substitute the index for negative IDs. Validate the index first: an invalid getter is not a command lookup.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns int

Stored record ID.

GetItemIndentint
# GetItemIndent
C#
public int GetItemIndent(int index);

Returns the stored indentation level, default 0, rather than the resulting offset.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

Returns int

Returns the stored indentation level, default 0, rather than the resulting offset.

GetItemIndexint
# GetItemIndex
C#
public int GetItemIndex(int id);

Returns the first current index with the ID, or -1. Duplicates are not prevented; resolve again after reorder/removal.

Parameters
NameTypeDefault
idint—
id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

Returns int

First matching-ID index, or -1.

GetItemLanguagestring
# GetItemLanguage
C#
public string GetItemLanguage(int index);

Returns the stored item language code, empty by default. Not necessarily the application’s current locale.

Parameters
NameTypeDefault
indexint—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

Returns string

Returns the stored item language code, empty by default. Not necessarily the application’s current locale.

GetItemMetadataVariant
# GetItemMetadata
C#
public Variant GetItemMetadata(int index);

Returns metadata Variant, Nil when unassigned. Validate the expected type before conversion.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns Variant

Metadata Variant, or Nil.

GetItemMultistateint
# GetItemMultistate
C#
public int GetItemMultistate(int index);

Returns stored state index rather than state count.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns int

Stored state index.

GetItemMultistateMaxint
# GetItemMultistateMax
C#
public int GetItemMultistateMax(int index);

Returns state count; nonpositive values disable ToggleItemMultistate advancement.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns int

State count.

GetItemShortcutShortcut
# GetItemShortcut
C#
public Shortcut GetItemShortcut(int index);

Returns the shared Shortcut resource, or null. This is not a copy: changing its Events affects items using it. Changing ResourceName does not itself replace item text; call SetItemText explicitly. Requires an ordinary valid index.

Parameters
NameTypeDefault
indexint—
index

Current item index rather than ID. Setter accepts negative indices from the end; getter requires an ordinary valid index.

Returns Shortcut

Returns the shared Shortcut resource, or null. This is not a copy: changing its Events affects items using it. Changing ResourceName does not itself replace item text; call SetItemText explicitly. Requires an ordinary valid index.

GetItemSubmenustring · Deprecated
# GetItemSubmenu
C#
public string GetItemSubmenu(int index);

Returns stored submenu name/path. Prefer GetItemSubmenuEntity in the installed SDK when you need the object.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns string

Stored submenu name/path.

GetItemSubmenuEntityPopupMenu
# GetItemSubmenuEntity
C#
public PopupMenu GetItemSubmenuEntity(int index);

Shared submenu object, or null. Does not change tree ownership/lifetime.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns PopupMenu

Shared PopupMenu, or null.

GetItemTextstring
# GetItemText
C#
public string GetItemText(int index);

Returns original item text rather than displayed translation or command ID.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns string

Original item text.

GetItemTextDirectionControl.TextDirection
# GetItemTextDirection
C#
public Control.TextDirection GetItemTextDirection(int index);

Returns the stored text-direction policy, default Auto, rather than the resolved direction of each line.

Parameters
NameTypeDefault
indexint—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

Returns Control.TextDirection

Returns the stored text-direction policy, default Auto, rather than the resolved direction of each line.

GetItemTooltipstring
# GetItemTooltip
C#
public string GetItemTooltip(int index);

Returns the stored tooltip string regardless of whether it is currently displayed.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

Returns string

Returns the stored tooltip string regardless of whether it is currently displayed.

GetSearchBarFuzzySearchMaxMissesint
# GetSearchBarFuzzySearchMaxMisses
C#
public int GetSearchBarFuzzySearchMaxMisses();

Fuzzy matcher miss allowance: integer 0 or greater, default 2. This configures matching rather than result count or a guaranteed Levenshtein distance.

Returns int

Fuzzy matcher miss allowance: integer 0 or greater, default 2. This configures matching rather than result count or a guaranteed Levenshtein distance.

GetSearchBarMinItemCountint
# GetSearchBarMinItemCount
C#
public int GetSearchBarMinItemCount();

Minimum number of non-separator items needed to show the enabled search field. Must be 0 or greater; default 0. Does not remove records or change IDs.

Returns int

Minimum number of non-separator items needed to show the enabled search field. Must be 0 or greater; default 0. Does not remove records or change IDs.

GetShrinkHeightbool
# GetShrinkHeight
C#
public bool GetShrinkHeight();

Fit the local popup height to its computed content minimum when preparing it, default true. false retains the requested height subject to window constraints. The setter does not itself open or resize an already displayed window.

Returns bool

Fit the local popup height to its computed content minimum when preparing it, default true. false retains the requested height subject to window constraints. The setter does not itself open or resize an already displayed window.

GetShrinkWidthbool
# GetShrinkWidth
C#
public bool GetShrinkWidth();

Fit the local popup width to its computed content minimum when preparing it, default true. false retains the requested width subject to window constraints. The setter does not itself open the menu.

Returns bool

Fit the local popup width to its computed content minimum when preparing it, default true. false retains the requested width subject to window constraints. The setter does not itself open the menu.

GetSubmenuPopupDelayfloat
# GetSubmenuPopupDelay
C#
public float GetSubmenuPopupDelay();

Hover submenu opening delay in seconds; default 0.2. A value ≤ 0 becomes 0.01; positive values below 0.01 are retained. Does not provide zero delay or trigger opening by itself.

Returns float

Hover submenu opening delay in seconds; default 0.2. A value ≤ 0 becomes 0.01; positive values below 0.01 are retained. Does not provide zero delay or trigger opening by itself.

GetSystemMenuNativeMenu.SystemMenus
# GetSystemMenu
C#
public NativeMenu.SystemMenus GetSystemMenu();
Returns NativeMenu.SystemMenus
GetSystemMenuRootstring
# GetSystemMenuRoot
C#
public string GetSystemMenuRoot();
Returns string
IsHideOnCheckableItemSelectionbool
# IsHideOnCheckableItemSelection
C#
public bool IsHideOnCheckableItemSelection();

Hide on check/radio activation, default true. Does not toggle checked itself.

Returns bool

Check/radio hiding flag.

IsHideOnItemSelectionbool
# IsHideOnItemSelection
C#
public bool IsHideOnItemSelection();

Hide on ordinary command activation, default true. Does not enable/disable handler execution.

Returns bool

Ordinary-command hiding flag.

IsHideOnStateItemSelectionbool
# IsHideOnStateItemSelection
C#
public bool IsHideOnStateItemSelection();

Hide on multistate activation, default false. Does not modify state.

Returns bool

Multistate hiding flag.

IsItemCheckablebool
# IsItemCheckable
C#
public bool IsItemCheckable(int index);

true for checkbox or radio type. Does not mean the item is checked.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

true for checkbox/radio type.

IsItemCheckedbool
# IsItemChecked
C#
public bool IsItemChecked(int index);

Stored checked flag independently of checkable type.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

Stored checked flag.

IsItemDisabledbool
# IsItemDisabled
C#
public bool IsItemDisabled(int index);

Item disabled flag rather than checkbox state.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

Record disabled flag.

IsItemIndeterminatebool
# IsItemIndeterminate
C#
public bool IsItemIndeterminate(int index);

Stored indeterminate flag.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

Stored indeterminate flag.

IsItemRadioCheckablebool
# IsItemRadioCheckable
C#
public bool IsItemRadioCheckable(int index);

true only for radio type. Does not imply an exclusive group.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

true for radio type.

IsItemSeparatorbool
# IsItemSeparator
C#
public bool IsItemSeparator(int index);

Separator flag; separators cannot be used as ordinary activation commands.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

Separator flag.

IsItemShortcutDisabledbool
# IsItemShortcutDisabled
C#
public bool IsItemShortcutDisabled(int index);

Shortcut-event handling disable flag, separate from Disabled.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Returns bool

Shortcut-event disable flag.

IsNativeMenubool
# IsNativeMenu
C#
public bool IsNativeMenu();

Returns true if the system native menu is supported and currently used by this PopupMenu.

Returns bool
IsPreferNativeMenubool
# IsPreferNativeMenu
C#
public bool IsPreferNativeMenu();
Returns bool
IsSearchBarEnabledbool
# IsSearchBarEnabled
C#
public bool IsSearchBarEnabled();

Enables the menu filter field, default false. It appears at SearchBarMinItemCount; separators do not count toward the threshold. While the field is visible, AllowSearch letter navigation is unused. This configures the local menu rather than guaranteeing an equivalent OS-native field.

Returns bool

Enables the menu filter field, default false. It appears at SearchBarMinItemCount; separators do not count toward the threshold. While the field is visible, AllowSearch letter navigation is unused. This configures the local menu rather than guaranteeing an equivalent OS-native field.

IsSearchBarFuzzySearchEnabledbool
# IsSearchBarFuzzySearchEnabled
C#
public bool IsSearchBarFuzzySearchEnabled();

Enables fuzzy matching in the search field, default true. false uses the matcher’s exact-token mode rather than promising byte-for-byte equality of the entire label. Search uses original item and submenu labels.

Returns bool

Enables fuzzy matching in the search field, default true. false uses the matcher’s exact-token mode rather than promising byte-for-byte equality of the entire label. Search uses original item and submenu labels.

IsSystemMenubool
# IsSystemMenu
C#
public bool IsSystemMenu();

Returns true if the menu is bound to the special system menu.

Returns bool
RemoveItemvoid
# RemoveItem
C#
public void RemoveItem(int index);

Removes a record and shifts later indices without renumbering IDs. Does not automatically free a submenu object; resolve command indices again after mutation.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

ScrollToItemvoid
# ScrollToItem
C#
public void ScrollToItem(int index);

Scrolls the local list toward the row at an ordinary valid index. Uses cached geometry; call after layout is established. Does not select, highlight or execute the item.

Parameters
NameTypeDefault
indexint—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

SetAllowSearchvoid
# SetAllowSearch
C#
public void SetAllowSearch(bool allow);

Enables navigation by the initial letters of original item labels, default true. This navigates rather than executing commands or providing a filter field. This letter-navigation mode is unused while the menu search bar is visible.

Parameters
NameTypeDefault
allowbool—
allow

Enable letter navigation while the search bar is not visible.

SetFocusedItemvoid
# SetFocusedItem
C#
public void SetFocusedItem(int index);

Sets the highlighted item index; -1 clears it. Does not grab window focus or execute a command. Does not reject disabled items or separators; choose an eligible item yourself. Emits neither IdFocused nor IdPressed.

Parameters
NameTypeDefault
indexint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

SetHideOnCheckableItemSelectionvoid
# SetHideOnCheckableItemSelection
C#
public void SetHideOnCheckableItemSelection(bool enable);

Hide on check/radio activation, default true. Does not toggle checked itself.

Parameters
NameTypeDefault
enablebool—
enable

Hide on check/radio activation, default true. Does not toggle checked itself.

SetHideOnItemSelectionvoid
# SetHideOnItemSelection
C#
public void SetHideOnItemSelection(bool enable);

Hide on ordinary command activation, default true. Does not enable/disable handler execution.

Parameters
NameTypeDefault
enablebool—
enable

Hide on ordinary command activation, default true. Does not enable/disable handler execution.

SetHideOnStateItemSelectionvoid
# SetHideOnStateItemSelection
C#
public void SetHideOnStateItemSelection(bool enable);

Hide on multistate activation, default false. Does not modify state.

Parameters
NameTypeDefault
enablebool—
enable

Hide on multistate activation, default false. Does not modify state.

SetItemAcceleratorvoid
# SetItemAccelerator
C#
public void SetItemAccelerator(int index, Key accel);

Sets an item Key accelerator. Key.None disables it; does not replace Shortcut or execute the command. Supports negative indices.

Parameters
NameTypeDefault
indexint—
accelKey—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

accel

Sets an item Key accelerator. Key.None disables it; does not replace Shortcut or execute the command. Supports negative indices.

SetItemAsCheckablevoid
# SetItemAsCheckable
C#
public void SetItemAsCheckable(int index, bool enable);

true selects checkbox type, replacing radio; false clears checkable type. Does not normalize other items’ checked flags. Supports negative indices.

Parameters
NameTypeDefault
indexint—
enablebool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

enable

true selects checkbox type, replacing radio; false clears checkable type. Does not normalize other items’ checked flags. Supports negative indices.

SetItemAsRadioCheckablevoid
# SetItemAsRadioCheckable
C#
public void SetItemAsRadioCheckable(int index, bool enable);

true selects radio type; false clears checkable type without creating a group. Implement exclusivity in your model/handler. Supports negative indices.

Parameters
NameTypeDefault
indexint—
enablebool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

enable

true selects radio type; false clears checkable type without creating a group. Implement exclusivity in your model/handler. Supports negative indices.

SetItemAsSeparatorvoid
# SetItemAsSeparator
C#
public void SetItemAsSeparator(int index, bool enable);

Changes separator type without removing the record or changing ID. This setter does not emit MenuChanged in the current implementation. Supports negative indices.

Parameters
NameTypeDefault
indexint—
enablebool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

enable

Changes separator type without removing the record or changing ID. This setter does not emit MenuChanged in the current implementation. Supports negative indices.

SetItemAutoTranslateModevoid
# SetItemAutoTranslateMode
C#
public void SetItemAutoTranslateMode(int index, Entity.AutoTranslateModeEnum mode);

Sets label translation policy: Inherit follows the menu setting, Always requests translation, Disabled retains the original string. Requires loaded translations and a suitable locale; does not generate translations. GetItemText is unchanged. Accepts negative indices.

Parameters
NameTypeDefault
indexint—
modeEntity.AutoTranslateModeEnum—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

mode

Inherit, Always or Disabled; a policy rather than a translation dictionary.

SetItemCheckedvoid
# SetItemChecked
C#
public void SetItemChecked(int index, bool @checked);

Sets checked without activation. A changed value clears indeterminate; reassigning the same checked value is a no-op and can retain indeterminate. Supports negative indices.

Parameters
NameTypeDefault
indexint—
checkedbool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

checked

Sets checked without activation. A changed value clears indeterminate; reassigning the same checked value is a no-op and can retain indeterminate. Supports negative indices.

SetItemCountvoid
# SetItemCount
C#
public void SetItemCount(int count);

Record count including separators. Setter requires ≥ 0; growth adds empty records with index-based IDs, shrinking discards the tail. Does not manage the lifetime of every child submenu.

Parameters
NameTypeDefault
countint—
count

Record count including separators. Setter requires ≥ 0; growth adds empty records with index-based IDs, shrinking discards the tail. Does not manage the lifetime of every child submenu.

SetItemDisabledvoid
# SetItemDisabled
C#
public void SetItemDisabled(int index, bool disabled);

Disables an item for ordinary input and ActivateItemByEvent without removing it. Programmatic state setters remain available. Supports negative indices.

Parameters
NameTypeDefault
indexint—
disabledbool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

disabled

Disables an item for ordinary input and ActivateItemByEvent without removing it. Programmatic state setters remain available. Supports negative indices.

SetItemIconvoid
# SetItemIcon
C#
public void SetItemIcon(int index, Texture2D icon);

Sets a shared Texture2D icon; does not copy the resource. null removes the icon. Accepts a negative index from the end. A change emits MenuChanged.

Parameters
NameTypeDefault
indexint—
iconTexture2D—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

icon

Shared Texture2D, or null to remove the icon.

SetItemIconMaxWidthvoid
# SetItemIconMaxWidth
C#
public void SetItemIconMaxWidth(int index, int width);

Sets an icon width limit in local UI units. Positive item and theme limits combine using the smaller value. A wider icon scales down with its aspect ratio preserved; smaller icons are not enlarged. A nonpositive value disables only the item limit. Accepts negative indices.

Parameters
NameTypeDefault
indexint—
widthint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

width

Positive width limit in local UI units; ≤ 0 disables the item limit, not the theme limit.

SetItemIconModulatevoid
# SetItemIconModulate
C#
public void SetItemIconModulate(int index, Color modulate);

Sets the icon RGBA multiplier; white retains its color. Does not tint text or modify the source Texture2D. Accepts negative indices. Requests redraw without MenuChanged.

Parameters
NameTypeDefault
indexint—
modulateColor—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

modulate

Icon RGBA multiplier; white (1,1,1,1) retains color.

SetItemIdvoid
# SetItemId
C#
public void SetItemId(int index, int id);

Changes a record ID without moving it. Does not enforce uniqueness; use a nonnegative value for stable IdPressed. Supports a negative record index from the end.

Parameters
NameTypeDefault
indexint—
idint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

SetItemIndentvoid
# SetItemIndent
C#
public void SetItemIndent(int index, int indent);

Sets an indentation level: local offset is indent × the theme indent constant. This is neither a pixel count nor submenu creation. Normally use a nonnegative level. Accepts a negative item index.

Parameters
NameTypeDefault
indexint—
indentint—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

indent

Indentation level multiplied by the theme indent constant; normally 0 or greater.

SetItemIndeterminatevoid
# SetItemIndeterminate
C#
public void SetItemIndeterminate(int index, bool indeterminate);

Changes the indeterminate flag; an actual change resets checked to false. Reassigning the same value does nothing. Supports negative indices.

Parameters
NameTypeDefault
indexint—
indeterminatebool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

indeterminate

Changes the indeterminate flag; an actual change resets checked to false. Reassigning the same value does nothing. Supports negative indices.

SetItemIndexvoid
# SetItemIndex
C#
public void SetItemIndex(int index, int targetIndex);

Moves the complete record, including ID/metadata/state, to final targetIndex. Both parameters accept indices from the end. Use ItemCount - 1 or -1 for the end rather than ItemCount.

Parameters
NameTypeDefault
indexint—
targetIndexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

targetIndex

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

SetItemLanguagevoid
# SetItemLanguage
C#
public void SetItemLanguage(int index, string language);

Sets the item text-shaping language hint; an empty string uses the current language. Does not translate the original text, change GetItemText or switch the application locale. Accepts negative indices from the end.

Parameters
NameTypeDefault
indexint—
languagestring—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

language

Text-shaping language code; an empty string uses the current language.

SetItemMetadatavoid
# SetItemMetadata
C#
public void SetItemMetadata(int index, Variant metadata);

Stores item Variant data. Moves with the record; Array/Dictionary can retain shared contents. Supports negative indices.

Parameters
NameTypeDefault
indexint—
metadataVariant—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

metadata

Stores item Variant data. Moves with the record; Array/Dictionary can retain shared contents. Supports negative indices.

SetItemMultistatevoid
# SetItemMultistate
C#
public void SetItemMultistate(int index, int state);

Sets state without activation. Setter does not clamp range: validate 0 ≤ state < maxStates yourself. Supports negative record indices.

Parameters
NameTypeDefault
indexint—
stateint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

state

Sets state without activation. Setter does not clamp range: validate 0 ≤ state < maxStates yourself. Supports negative record indices.

SetItemMultistateMaxvoid
# SetItemMultistateMax
C#
public void SetItemMultistateMax(int index, int maxStates);

Sets state count without normalizing current state. Use a positive value for active multistate and update state separately. Supports negative indices.

Parameters
NameTypeDefault
indexint—
maxStatesint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

maxStates

Sets state count without normalizing current state. Use a positive value for active multistate and update state separately. Supports negative indices.

SetItemShortcutvoid
# SetItemShortcut
C#
public void SetItemShortcut(int index, Shortcut shortcut, bool global = false);

Replaces an existing item’s shared Shortcut and global flag; null removes the Shortcut. Does not change its label, icon, checked state or separate accelerator. Does not set allowEcho: the policy established when adding the item is retained. Accepts negative indices from the end. Updated Events on the shared Shortcut are used by subsequent matches.

Parameters
NameTypeDefault
indexint—
shortcutShortcut—
globalboolfalse
index

Current item index rather than ID. Setter accepts negative indices from the end; getter requires an ordinary valid index.

shortcut

Shared Shortcut, or null to remove it. Events supplies input alternatives; ResourceName does not replace the current label.

global

Include this Shortcut in global-only menu shortcut matching. Not OS-wide registration outside the application.

SetItemShortcutDisabledvoid
# SetItemShortcutDisabled
C#
public void SetItemShortcutDisabled(int index, bool disabled);

Disables item shortcut-event handling; also excludes its accelerator in ActivateItemByEvent. Does not disable the whole item for ordinary clicks. Supports negative indices.

Parameters
NameTypeDefault
indexint—
disabledbool—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

disabled

Disables item shortcut-event handling; also excludes its accelerator in ActivateItemByEvent. Does not disable the whole item for ordinary clicks. Supports negative indices.

SetItemSubmenuvoid · Deprecated
# SetItemSubmenu
C#
public void SetItemSubmenu(int index, string submenu);

Legacy setter in the installed SDK: resolves an existing PopupMenu by relative path. Prefer SetItemSubmenuEntity. An empty string is not a reliable way to clear a submenu; the typed setter also rejects null.

Parameters
NameTypeDefault
indexint—
submenustring—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

submenu

Relative path to an existing PopupMenu.

SetItemSubmenuEntityvoid
# SetItemSubmenuEntity
C#
public void SetItemSubmenuEntity(int index, PopupMenu submenu);

Assigns a non-null PopupMenu to an existing item. A parentless submenu becomes a child of this menu; objects owned by another parent are rejected. Replacement neither frees nor detaches the previous submenu. Do not pass null to clear it: remove/recreate the item, then separately clean up an unused child. Accepts negative indices.

Parameters
NameTypeDefault
indexint—
submenuPopupMenu—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

submenu

Non-null PopupMenu that is parentless or already a child of this menu.

SetItemTextvoid
# SetItemText
C#
public void SetItemText(int index, string text);

Changes original text and refreshes translation/shaping rather than ID. Supports negative indexing from the end; does not activate the command.

Parameters
NameTypeDefault
indexint—
textstring—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

text

Changes original text and refreshes translation/shaping rather than ID. Supports negative indexing from the end; does not activate the command.

SetItemTextDirectionvoid
# SetItemTextDirection
C#
public void SetItemTextDirection(int index, Control.TextDirection direction);

Sets the item’s base text-shaping direction. Auto derives it from text; this neither translates text nor mirrors the entire window layout. GetItemText remains original. Accepts negative indices.

Parameters
NameTypeDefault
indexint—
directionControl.TextDirection—
index

Existing item index rather than ID. Reviewed SetItem* methods accept negative indices from the end; getters and ScrollToItem require an ordinary valid index.

direction

Base Control.TextDirection policy, default Auto.

SetItemTooltipvoid
# SetItemTooltip
C#
public void SetItemTooltip(int index, string tooltip);

Stores tooltip text; an empty string removes its text. Does not immediately open a tooltip or change the command label. Accepts negative indices; assigning the same value does nothing.

Parameters
NameTypeDefault
indexint—
tooltipstring—
index

Ordinary valid item index. SetItem* also accepts a negative index from the end; SetFocusedItem uses -1 only to clear.

tooltip

Tooltip text; an empty string removes its text.

SetPreferNativeMenuvoid
# SetPreferNativeMenu
C#
public void SetPreferNativeMenu(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetSearchBarEnabledvoid
# SetSearchBarEnabled
C#
public void SetSearchBarEnabled(bool enabled);

Enables the menu filter field, default false. It appears at SearchBarMinItemCount; separators do not count toward the threshold. While the field is visible, AllowSearch letter navigation is unused. This configures the local menu rather than guaranteeing an equivalent OS-native field.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the specified local menu feature.

SetSearchBarFuzzySearchEnabledvoid
# SetSearchBarFuzzySearchEnabled
C#
public void SetSearchBarFuzzySearchEnabled(bool enabled);

Enables fuzzy matching in the search field, default true. false uses the matcher’s exact-token mode rather than promising byte-for-byte equality of the entire label. Search uses original item and submenu labels.

Parameters
NameTypeDefault
enabledbool—
enabled

Enable the specified local menu feature.

SetSearchBarFuzzySearchMaxMissesvoid
# SetSearchBarFuzzySearchMaxMisses
C#
public void SetSearchBarFuzzySearchMaxMisses(int maxMisses);

Fuzzy matcher miss allowance: integer 0 or greater, default 2. This configures matching rather than result count or a guaranteed Levenshtein distance.

Parameters
NameTypeDefault
maxMissesint—
maxMisses

Search matcher allowance, integer 0 or greater.

SetSearchBarMinItemCountvoid
# SetSearchBarMinItemCount
C#
public void SetSearchBarMinItemCount(int count);

Minimum number of non-separator items needed to show the enabled search field. Must be 0 or greater; default 0. Does not remove records or change IDs.

Parameters
NameTypeDefault
countint—
count

Non-separator item-count threshold, 0 or greater.

SetShrinkHeightvoid
# SetShrinkHeight
C#
public void SetShrinkHeight(bool shrink);

Fit the local popup height to its computed content minimum when preparing it, default true. false retains the requested height subject to window constraints. The setter does not itself open or resize an already displayed window.

Parameters
NameTypeDefault
shrinkbool—
shrink

Fit size along this axis when preparing the popup.

SetShrinkWidthvoid
# SetShrinkWidth
C#
public void SetShrinkWidth(bool shrink);

Fit the local popup width to its computed content minimum when preparing it, default true. false retains the requested width subject to window constraints. The setter does not itself open the menu.

Parameters
NameTypeDefault
shrinkbool—
shrink

Fit size along this axis when preparing the popup.

SetSubmenuPopupDelayvoid
# SetSubmenuPopupDelay
C#
public void SetSubmenuPopupDelay(float seconds);

Hover submenu opening delay in seconds; default 0.2. A value ≤ 0 becomes 0.01; positive values below 0.01 are retained. Does not provide zero delay or trigger opening by itself.

Parameters
NameTypeDefault
secondsfloat—
seconds

Delay in seconds; ≤ 0 becomes 0.01.

SetSystemMenuvoid
# SetSystemMenu
C#
public void SetSystemMenu(NativeMenu.SystemMenus systemMenuId);
Parameters
NameTypeDefault
systemMenuIdNativeMenu.SystemMenus—
SetSystemMenuRootvoid
# SetSystemMenuRoot
C#
public void SetSystemMenuRoot(string special);
Parameters
NameTypeDefault
specialstring—
ToggleItemCheckedvoid
# ToggleItemChecked
C#
public void ToggleItemChecked(int index);

Inverts checked without activation. Does not clear indeterminate or uncheck radio siblings. Requires an ordinary valid index.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

ToggleItemMultistatevoid
# ToggleItemMultistate
C#
public void ToggleItemMultistate(int index);

Increments state, wrapping to 0 at maxStates. Does nothing when maxStates ≤ 0. Does not activate the command; requires an ordinary valid index.

Parameters
NameTypeDefault
indexint—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

Signals and events4

IdFocusedEvent
# IdFocused
C#
public event PopupMenu.IdFocusedEventHandler IdFocused;

Reports menu navigation highlight changes. Carries the stored ID, including negative values; the negative-ID-to-index fallback of IdPressed does not apply. Direct SetFocusedItem emits no signal. Do not execute commands merely because they become highlighted.

Handler parameters
NameTypeDefault
idlong—
id

Stored highlighted-item ID, including negative values. Not an index.

IdPressedEvent
# IdPressed
C#
public event PopupMenu.IdPressedEventHandler IdPressed;

Command activation: ID, or index when stored ID is negative. Precedes IndexPressed. Use unique nonnegative IDs for stable routing.

Handler parameters
NameTypeDefault
idlong—
id

Command ID, separate from index; use a unique nonnegative value. -1 in ordinary additions assigns the current index, unlike AddSeparator.

IndexPressedEvent
# IndexPressed
C#
public event PopupMenu.IndexPressedEventHandler IndexPressed;

Activation index captured when activation began, after IdPressed. If the first handler changed the list, the index can now refer to another record. Do not execute one action in both signals.

Handler parameters
NameTypeDefault
indexlong—
index

Current index 0…ItemCount-1; reviewed SetItem* methods accept negative indices from the end. Not an ID.

MenuChangedEvent
# MenuChanged
C#
public event Action MenuChanged;

Notification from many menu mutations rather than activation. Not every setter emits it: SetItemAsSeparator does not. Do not use it as sole observation of all writes.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
font_accelerator_color
Color

The text Color used for shortcuts and accelerators that show next to the menu item name when defined. See PopupMenu.GetItemAccelerator for more info on accelerators.

Default: Color(0.7, 0.7, 0.7, 0.8)
font_color
Color

The default text Color for menu items' names.

Default: Color(0.875, 0.875, 0.875, 1)
font_disabled_color
Color

Color used for disabled menu items' text.

Default: Color(0.4, 0.4, 0.4, 0.8)
font_hover_color
Color

Color used for the hovered text.

Default: Color(0.875, 0.875, 0.875, 1)
font_outline_color
Color

The tint of text outline of the menu item.

Default: Color(0, 0, 0, 1)
font_separator_color
Color

Color used for labeled separators' text. See PopupMenu.AddSeparator.

Default: Color(0.875, 0.875, 0.875, 1)
font_separator_outline_color
Color

The tint of text outline of the labeled separator.

Default: Color(0, 0, 0, 1)
gutter_compact
int

If not 0, the icon gutter will be merged with the checkbox gutter when possible. This acts as a boolean.

Default: 1
h_separation
int

The horizontal space between the item's elements.

Default: 4
icon_max_width
int

The maximum allowed width of the item's icon. This limit is applied on top of the default size of the icon, but before the value set with PopupMenu.SetItemIconMaxWidth. The height is adjusted according to the icon's ratio.

Default: 0
indent
int

Width of the single indentation level.

Default: 10
item_end_padding
int

Horizontal padding to the right of the items (or left, in RTL layout).

Default: 2
item_start_padding
int

Horizontal padding to the left of the items (or right, in RTL layout).

Default: 2
outline_size
int

The size of the item text outline. Note: If using a font with FontFile.MultichannelSignedDistanceField enabled, its FontFile.MsdfPixelRange must be set to at least twice the value of PopupMenu.outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.

Default: 0
search_bar_separation
int

The vertical space between search bar and menu items.

Default: 4
separator_outline_size
int

The size of the labeled separator text outline.

Default: 0
v_separation
int

The vertical space between each menu item.

Default: 4
font
Font

Font used for the menu items.

font_separator
Font

Font used for the labeled separator.

font_separator_size
int

Font size of the labeled separator.

font_size
int

Font size of the menu items.

checked
Texture2D

Texture2D icon for the checked checkbox items.

checked_disabled
Texture2D

Texture2D icon for the checked checkbox items when they are disabled.

indeterminate
Texture2D

Texture2D icon for the indeterminate checkbox items.

indeterminate_disabled
Texture2D

Texture2D icon for the indeterminate checkbox items when they are disabled.

radio_checked
Texture2D

Texture2D icon for the checked radio button items.

radio_checked_disabled
Texture2D

Texture2D icon for the checked radio button items when they are disabled.

radio_unchecked
Texture2D

Texture2D icon for the unchecked radio button items.

radio_unchecked_disabled
Texture2D

Texture2D icon for the unchecked radio button items when they are disabled.

submenu
Texture2D

Texture2D icon for the submenu arrow (for left-to-right layouts).

submenu_mirrored
Texture2D

Texture2D icon for the submenu arrow (for right-to-left layouts).

unchecked
Texture2D

Texture2D icon for the unchecked checkbox items.

unchecked_disabled
Texture2D

Texture2D icon for the unchecked checkbox items when they are disabled.

item_activated_disabled_sound
AudioStream

Played when activating a disabled item is attempted.

item_activated_sound
AudioStream

Played when an item is activated.

item_hovered_sound
AudioStream

Played when an item is hovered. Disabled items do not play a hover sound.

hover
StyleBox

StyleBox displayed when the PopupMenu item is hovered.

labeled_separator_left
StyleBox

StyleBox for the left side of labeled separator. See PopupMenu.AddSeparator.

labeled_separator_right
StyleBox

StyleBox for the right side of labeled separator. See PopupMenu.AddSeparator.

panel
StyleBox

StyleBox for the background panel.

separator
StyleBox

StyleBox used for the separators. See PopupMenu.AddSeparator.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.