I have created a toggle button in ExtJS as:
{
xtype: 'button',
text: 'Edit Mode',
id: 'editID',
action: 'myToggle',
pressed: false,
enableToggle: true,
margin: 5,
handler: function (btn, e) {
editMode(btn); // checks the status of the toggle button
}
}
In some part in my script I want to check if the button is selected or not. I have tried several ways like:
var isChecked = Ext.get('editID').pressed; # gives undefined
Or
var parent_sub_id_isChecked = Ext.get('editID').dom.pressed; # also undefined
How can I get the status of the "pressed" property of a button in ExtJS?