Skip to main content

MenuSubmenuWithIcon class

📖 Description

The MenuSubmenuWithIcon class defines a menu item (with an icon) for the Menu class that can hold another menu (sub-menu). It is derived from the MenuSubmenu class.

🆕 constructor

Creates a new MenuSubmenuWithIcon instance.


icon: number,
label: string,
options: MenuOption[],
disabled?: boolean
): MenuSubmenuWithIcon


iconnumberNoSpecifies the icon.
labelstringNoSpecifies the item label.
optionsMenuOption[]NoSpecifies the submenu options.
disabledbooleanYesSpecifies if the item is disabled (default is false).

Return value

Returns a reference to the new MenuSubmenuWithIcon instance.