Clear Up
SharpKit Reference

Split Class

A split button that provides a built-in dropdown arrow that can fire an event separately from the default click event of the button. Typically this would be used to display a dropdown menu that provides additional options to the primary button action, but any custom handler can provide the arrowclick implementation. Example usage:

// display a dropdown menu:
            Ext.create('Ext.button.Split', {
            renderTo: Ext.getBody(),
            text: 'Options',
            // handle a click on the button itself
            handler: function() {
            alert("The button was clicked");
            menu: new{
            items: [
            // these will render as dropdown menu items when the arrow is clicked:
            {text: 'Item 1', handler: function(){ alert("Item 1 clicked"); }},
            {text: 'Item 2', handler: function(){ alert("Item 2 clicked"); }}

Instead of showing a menu, you can provide any type of custom functionality you want when the dropdown arrow is clicked:

    Ext.create('Ext.button.Split', {
            renderTo: 'button-ct',
            text: 'Options',
            handler: optionsHandler,
            arrowHandler: myCustomHandler

Namespace: Ext.button

Derived Types



Name Description
arrowHandler A function called when the arrow button is clicked (can be used instead of click event)
arrowTooltip The title attribute of the arrow


Name Description
setArrowHandler(Delegate, object) Sets this button's arrow click handler.
© Copyright 2005-2011 SharpKit. All rights reserved.