Clear Up
SharpKit Reference

Item Class

A base class for all menu items that require menu-related functionality such as click handling, sub-menus, icons, etc.

    Ext.create('', {
            width: 100,
            height: 100,
            floating: false,  // usually you want this set to True (default)
            renderTo: Ext.getBody(),  // usually rendered by it's containing component
            items: [{
            text: 'icon item',
            iconCls: 'add16'
            text: 'text item'
            text: 'plain item',
            plain: true




Name Description
activated Whether or not this item is currently activated
menu The sub-menu associated with this item, if one was configured.
parentMenu The parent Menu of this item.


Name Description
activeCls The CSS class added to the menu item when the item is activated (focused/mouseover). Defaults to: "x-menu-item-active"
ariaRole Defaults to: "menuitem"
canActivate Whether or not this menu item can be activated when focused/mouseovered. Defaults to: true
clickHideDelay The delay in milliseconds to wait before hiding the menu after clicking the menu item. This only has an effect when hideOnClick: true. Defaults to: 1
destroyMenu Whether or not to destroy any associated sub-menu when this item is destroyed. Defaults to: true
handler A function called when the menu item is clicked (can be used instead of click event).
hideOnClick Whether to not to hide the owning menu when this item is clicked. Defaults to: true
href The href attribute to use for the underlying anchor link. Defaults to: "#"
hrefTarget The target attribute to use for the underlying anchor link.
icon The path to an icon to display in this item. Defaults to Ext.BLANK_IMAGE_URL.
iconCls A CSS class that specifies a background-image to use as the icon for this item.
menuAlign The default Ext.Element.getAlignToXY anchor position value for this item's sub-menu relative to this item's position. Defaults to: "tl-tr?"
menuExpandDelay The delay in milliseconds before this item's sub-menu expands after this item is moused over. Defaults to: 200
menuHideDelay The delay in milliseconds before this item's sub-menu hides after this item is moused out. Defaults to: 200
plain Whether or not this item is plain text/html with no icon or visual activation.
text The text/html to display in this item.
tooltip The tooltip for the button - can be a string to be used as innerHTML (html tags are accepted) or QuickTips config object.
tooltipType The type of tooltip to use. Either 'qtip' for QuickTips or 'title' for title attribute. Defaults to: "qtip"


Name Description
setHandler(Delegate, object) Sets the click handler of this item
setIcon(JsString) Sets the icon on this item.
setIconCls(JsString) Sets the iconCls of this item
setMenu(object, object) Set a child menu for this item. See the menu configuration.
setText(JsString) Sets the text of this item
setTooltip(object) Sets the tooltip for this menu item.
© Copyright 2005-2011 SharpKit. All rights reserved.