Hello...
I want to want to create (left, center,right)Justification buttons as are in most of the editors...
i have created buttons as:
//code to create justification buttons....
var justifyLeftBtn=new Ext.Toolbar.Button({ //creat button of group Justify
icon:'style/default/images/icons/justifyleft.gif',
cls: 'x-btn-icon',//lib define class of CSS
enableToggle: true,
toggleGroup:'justify',
pressed: true
});
var justifyCenterBtn=new Ext.Toolbar.Button({ //creat button of group Justify
icon:'style/default/images/icons/justifycenter.gif',
cls: 'x-btn-icon',//lib define class of CSS
enableToggle: true,
toggleGroup:'justify'
});
var justifyRightBtn=new Ext.Toolbar.Button({ //creat button of group Justify
icon:'style/default/images/icons/justifyright.gif',
cls: 'x-btn-icon',//lib define class of CSS
enableToggle: true,
toggleGroup:'justify'
});
and then i added them to tool bar....
now the problem, i am facing is that i need that at least one of these buttons is selected at every time....
the problem in my code is that: here can be a situation that no one is selected, if i have selected left justify and i press it again, then no will be selected as all of these are toggle buttons....
i need way that here can be applied some kind of force selection for these buttons...
kindly help me with some snippet of code....
thanks and waiting for ur positive reply...