DHTMLX Docs & Samples Explorer
Index
dhtmlxmenu
API Methods
dhtmlxMenu API Methods
dhtmlXMenuObject Object :: Common
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
attachEvent
- attaches an event handler
checkEvent
- returns true if the event exists
clearAll
- clears all loaded items
detachEvent
- removes an event handler
forEachItem
- iterator, calls a user handler for each item
getItemPosition
- returns item's position in the current polygon
getItemType
- returns item type by id
getParentId
- returns parent's id
hide
- hides any open menu polygons
hideContextMenu
- usercall to hide a contextual menu
isContextZone
- returns true if an object is used as a contextual zone for the menu
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
setIconPath
- alias for setIconsPath
setIconsPath
- defines an url where necessary user embedded icons are located
setItemPosition
- sets new item's position in the current polygon (moves an item inside the single level)
setSkin
- changes menu skin
showContextMenu
- usercall to show a contextual menu
unload
- unloads menu from page (destructor)
dhtmlXMenuObject Object :: Extension
addCheckbox
- adds a new checkbox, sibling|child mode
addRadioButton
- adds a new radio button, sibling|child mode
clearHref
- clears item href and back item to default onClick behavior
clearItemImage
- removes both enabled and disabled item images
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)
getItemText
- returns item's text
getRadioChecked
- returns a checked radio button id in the group
getTooltip
- returns tooltip of a menu item
getUserData
- returns item's userdata
hideItem
- hides an item
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
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
setItemDisabled
- disables an item
setItemEnabled
- enables an item
setItemImage
- sets an image for the item
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
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)
showItem
- shows an item
dhtmlXMenuObject Object :: Deprecated
setImagePath
- deprecated, not more used from version 2.1, 90226