I have an ExtJS button like this:
new Ext.SplitButton({
text: 'Index',
iconCls: 'index',
scale: 'large',
iconAlign: 'left',
cls: 'header-item',
handler: leftPanelNav, // handle a click on the button itself
menu: new Ext.menu.Menu({
items: [
// these items will render as dropdown
// menu items when the arrow is clicked:
{text: 'Item 1'},
{text: 'Item 2'}
]
})
})
His state will be pressed at a time and I want to know how can I unpress it when I want to from script.
Thank you.
var myWin = new Ext. Window({ height : 100, width : 200, maximizable : true, items : [ { xtype : 'button', text : 'myButton' // align : center } ] }); myWin. show();
Menus. You can assign a menu to a button by using the menu config. This config can be either a reference to a Ext.
Call toggle()
on the button:
http://www.extjs.com/deploy/ext/docs/output/Ext.SplitButton.html (dead link)
http://dev.sencha.com/playpen/docs/output/Ext.SplitButton.html
If a state it passed, it becomes the pressed state otherwise the current state is toggled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With