PDA

View Full Version : want to create Justification buttons...



sathtek
8 Aug 2007, 2:19 AM
want to create Justification buttons...

--------------------------------------------------------------------------------

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...

manugoel2003
8 Aug 2007, 4:22 AM
I suggest you put ur code in code tag block.... the little pound sign in the editor toolbar.... that will invite people to actually stop and read ur code

mystix
8 Aug 2007, 4:31 AM
I suggest you put ur code in code tag block.... the little pound sign in the editor toolbar.... that will invite people to actually stop and read ur code

=D>=D>=D>

if i had $1 for every thread in Help that contains pigeon scratchings... 8-|