Clear Up
SharpKit Reference

ButtonConfig Class

Namespace: Ext.button

Constructors

Name Description
ButtonConfig(Object[])

Fields

Name Description
allowDepress False to not allow a pressed Button to be depressed. Only valid when enableToggle is true. Defaults to: true
arrowAlign The side of the Button box to render the arrow if the button has an associated menu. Two values are allowed:
  • 'right'
  • 'bottom'
  • Defaults to: "right"
    arrowCls The className used for the inner arrow element if the button has a menu. Defaults to: "arrow"
    baseParams An object literal of parameters to pass to the url when the href property is specified.
    clickEvent The DOM event that will fire the handler of the button. This can be any valid event name (dblclick, contextmenu). Defaults to: "click"
    enableToggle True to enable pressed/not pressed toggling. If a toggleGroup is specified, this option will be set to true. Defaults to: false
    focusCls The CSS class to add to a button when it is in the focussed state. Defaults to: "focus"
    handleMouseEvents False to disable visual cues on mouseover, mouseout and mousedown. Defaults to: true
    handler A function called when the button is clicked (can be used instead of click event).
    href The URL to open when the button is clicked. Specifying this config causes the Button to be rendered with an anchor (An <a> element) as its active element, referencing the specified URL. This is better than specifying a click handler of
    function() { window.location = "http://www.sencha.com" }
                
    because the UI will provide meaningful hints to the user as to what to expect upon clicking the button, and will also allow the user to open in a new tab or window, bookmark or drag the URL, or directly save the URL stream to disk. See also the hrefTarget config.
    hrefTarget The target attribute to use for the underlying anchor. Only used if the href property is specified. Defaults to: "_blank"
    icon The path to an image to display in the button.
    iconAlign The side of the Button box to render the icon. Four values are allowed:
  • 'top'
  • 'right'
  • 'bottom'
  • 'left'
  • Defaults to: "left"
    iconCls A css class which sets a background image to be used as the icon for this button.
    menu Standard menu attribute consisting of a reference to a menu object, a menu id or a menu config blob.
    menuActiveCls The CSS class to add to a button when it's menu is active. Defaults to: "menu-active"
    menuAlign The position to align the menu to (see Ext.Element.alignTo for more details). Defaults to: "tl-bl?"
    overflowText If used in a Toolbar, the text to be used if this item is shown in the overflow menu. See also Ext.toolbar.Item.overflowText.
    params An object literal of parameters to pass to the url when the href property is specified. Any params override baseParams. New params can be set using the setParams method.
    pressed True to start pressed (only if enableToggle = true) Defaults to: false
    pressedCls The CSS class to add to a button when it is in the pressed state. Defaults to: "pressed"
    preventDefault True to prevent the default action when the clickEvent is processed. Defaults to: true
    repeat True to repeat fire the click event while the mouse is down. This can also be a ClickRepeater config object. Defaults to: false
    scale The size of the Button. Three values are allowed:
  • 'small' - Results in the button element being 16px high.
  • 'medium' - Results in the button element being 24px high.
  • 'large' - Results in the button element being 32px high.
  • Defaults to: "small"
    scope The scope (this reference) in which the handler and toggleHandler is executed. Defaults to this Button.
    tabIndex Set a DOM tabIndex for this button.
    text The button text to be used as innerHTML (html tags are accepted).
    textAlign The text alignment for this button (center, left, right). Defaults to: "center"
    toggleGroup The group this toggle button is a member of (only 1 per group can be pressed). If a toggleGroup is specified, the enableToggle configuration will automatically be set to true.
    toggleHandler Function called when a Button with enableToggle set to true is clicked.
    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"
    type The type of <input> to create: submit, reset or button. Defaults to: "button"
    © Copyright 2005-2011 SharpKit. All rights reserved.