EMenu Menu
Examples
Nested menus and overflow
Menu
Properties
activeTextColorcolorText color of the selected item.
Dynamic bindingbackgroundColorcolorBackground color.
Dynamic bindingcloseOnClickOutsideboolClose when clicking outside the popup.
truecollapseboolUse a collapsed menu.
falsecollapseCloseIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_RIGHTcollapseOpenIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_RIGHTcollapseTransitionboolAnimate menu collapse transitions.
falsecurrentIndexstringIdentifier of the selected menu item.
Menu item identifier"": no selection
""directionintComponent layout direction.
EOrientation.HorizontalEOrientation.Vertical
EOrientation.VerticaldurationintAnimation or display duration in milliseconds; the component binding identifies its use.
180ellipsisboolCollapse overflowing horizontal entries into a more menu.
trueellipsisIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.ELLIPSISenabledboolAllow interaction; false disables the control.
trueexpandCloseIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_DOWNexpandOpenIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.CHEVRON_UPheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeighthideTimeoutintDelay, throttling or automatic close time in milliseconds; 0 means no delay or no timed close.
150hoverColorcolorHover background color.
Dynamic bindingiconSizeintSize of the icon, option or interactive part in pixels.
16indentintIndentation per tree or menu level in pixels.
20itemHeightintMenu item, data row or header row height in pixels.
44modelvarComponent data source; item structure follows the current example and component contract.
[]openedIndexesvarUnique keys of expanded nodes, table rows or menu entries.
[]persistentboolKeep popup content instantiated after closing.
truepopperEffectstringVisual theme of the popup.
"light" / "dark"
"light"popperOffsetrealGap between popup menu and reference item in pixels.
0showTimeoutintDelay, throttling or automatic close time in milliseconds; 0 means no delay or no timed close.
150styleTypeintSemantic color style.
EStyle.DefaultEStyle.PrimaryEStyle.SuccessEStyle.InfoEStyle.WarningEStyle.Danger
EStyle.PrimarytextColorcolorText color.
Dynamic bindinguniqueOpenedboolKeep at most one submenu open at each level.
truevisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthallEntriesvarRead onlyAll menu entries after flattening hierarchy.
Computed at runtimedisplayItemsvarRead onlyEntries directly displayed in the horizontal menu.
Computed at runtimehorizontalboolRead onlyWhether the resolved layout is horizontal or vertical.
Computed at runtimenaturalWidthrealRead onlyNatural menu width before overflow collapse.
Computed at runtimeoverflowItemsvarRead onlyHorizontal menu entries moved into the overflow menu.
Computed at runtimepopupModeboolRead onlyWhether the menu uses popup submenus.
Computed at runtimeresolvedActiveTextColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimeresolvedBackgroundColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimeresolvedHoverColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimeresolvedTextColorcolorRead onlyResolved color from the theme, current state and custom palette.
Computed at runtimevisibleItemsvarRead onlyCurrently visible menu entries.
Computed at runtimevisibleRootCountintRead onlyNumber of root entries directly visible in the horizontal menu.
Computed at runtimeSignals
closed(string index)Emitted when a submenu closes; index identifies the submenu.
opened(string index)Emitted when a submenu opens; index identifies the submenu.
branchClosed(string index, var indexPath)Emitted when a submenu branch closes; index identifies it and indexPath is its full menu path.
branchOpened(string index, var indexPath)Emitted when a submenu branch opens; index identifies it and indexPath is its full menu path.
itemSelected(string index, var indexPath, var item)Emitted when a menu item is selected; index identifies it, indexPath is its full path, and item is its data.
Methods
toggle(index)Toggle the expanded or selected state; pass the target identifier when required.
isOpened(index)Return whether the submenu identified by index is open.
trigger(index, item)Invoke the specified item command, as if the item were selected.
updateActiveIndex(index)Set the active menu item identifier.
select(index)Activate the menu item identified by index.
close(index)Close the submenu identified by index.
open(index)Open the submenu identified by index.