Tuesday, 30 April 2013

How to check button pressed in ExtJs3.4 and make it pressed programmatically

To fetch the button status

var btnPressed = Ext.getCmp("#elementId").pressed;

The btnPressed contains boolean value

To make it pressed programmatically you can use toggle function


This function changes the pressed state of the button

Suppose we want that if its pressed we want to un-press  it


Ref 1
Ref 2