To fetch the button status
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
var btnPressed = Ext.getCmp("#elementId").pressed;
The btnPressed contains boolean value
To make it pressed programmatically you can use toggle function
Ext.getCmp("#elementId").toggle();
This function changes the pressed state of the button
Suppose we want that if its pressed we want to un-press it
if(btnPressed)
{
Ext.getCmp("#elementId").toggle();
}
Ref 1
Ref 2