# dhtmlxmenu:api_toc_alpha [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxmenu

## dhtmlxMenu API Methods

#### dhtmlXMenuObject Object

- addCheckbox* adds a new checkbox, sibling|child mode
- addContextZone adds a contextual zone to a contextual menu
- addNewChild adds a new child item
- addNewSeparator adds a new separator
- addNewSibling adds a new sibling item
- addRadioButton* adds a new radio button, sibling|child mode
- attachEvent attaches an event handler
- checkEvent returns true if the event exists
- clearAll clears all loaded items
- clearHref* clears item href and back item to default onClick behavior
- clearItemImage* removes both enabled and disabled item images
- detachEvent removes an event handler
- enableDynamicLoading* enables dynamic loading of sublevels
- getCheckboxState* returns true if checkbox checked
- getContextMenuHideAllMode* returns hide all contextual menu mode
- getHotKey* returns item's hot-key (just text label)
- getItemImage* returns item's image - array(img, imgDis)
- getItemPosition returns item's position in the current polygon
- getItemText* returns item's text
- getItemType returns item type by id
- getParentId returns parent's id
- getRadioChecked* returns a checked radio button id in the group
- getTooltip* returns tooltip of a menu item
- getUserData* returns item's userdata
- hide hides any open menu polygons
- hideContextMenu usercall to hide a contextual menu
- hideItem* hides an item
- isContextZone returns true if an object is used as a contextual zone for the menu
- isItemEnabled* returns true if the item is enabled
- isItemHidden* returns true if the item is hidden
- loadFromHTML* loads menu data from an html and calls onLoadFunction when loading is done
- loadXML loads menu data from an xml file and calls onLoadFunction when loading is done
- loadXMLString loads menu data from an xml string and calls onLoadFunction when loading is done
- removeContextZone removes an object from contextual zones list
- removeItem removes an item from the menu with all nested sublevels
- renderAsContextMenu renders menu as contextual
- setAlign* sets top level menu align
- setAutoHideMode* sets to false to prevent hiding a contextual menu by a click
- setAutoShowMode* sets to false to prevent showing a contextual menu by a click
- setCheckboxState* sets checkbox's state (checked/unchecked)
- setContextMenuHideAllMode* sets to true will hide all opened contextual menu polygons on mouseout
- setHotKey* sets menu hot-key (just text label)
- setHref* sets href to item, overwrite old if exists
- setIconPath alias for setIconsPath
- setIconsPath defines an url where necessary user embedded icons are located
- setImagePath deprecated, not more used from version 2.1, 90226
- setItemDisabled* disables an item
- setItemEnabled* enables an item
- setItemImage* sets an image for the item
- setItemPosition sets new item's position in the current polygon (moves an item inside the single level)
- setItemText* sets text for the item
- setOpenMode* sets open mode for the menu
- setOverflowHeight* limits the maximum number of visible items in polygons
- setRTL* sets right-to-left mode
- setRadioChecked* checks a radio button inside the group
- setSkin changes menu skin
- setTooltip* sets tooltip for a menu item
- setTopText* sets top level additional text (in case of usual menubar)
- setUserData* sets userdata for an item
- setVisibleArea* sets the area in which the menu can appear, if the area is not set, the menu will occupy all available visible space
- setWebModeTimeout* sets hide menu timeout (web mode only)
- showContextMenu usercall to show a contextual menu
- showItem* shows an item
- unload unloads menu from page (destructor)

Methods marked with * require dhtmlxmenu_ext.js file