-
13 Mar 2012 1:11 AM #1
Answered: ToggleGroup with buttons
Answered: ToggleGroup with buttons
I'm kinda lost on the toggleGroup setting and the documentation doesn't get me any wiser
I have three buttons with the same toggleGroup bot only one of them toggles the rest works like average buttons.
this is how I define them
afterwards I simple add them to a panelCode:inBtn = Ext.create('Ext.button.Button', { xtype: 'button', id: 'in', text: 'in', toggleGroup: 'searchBtns' }); outBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'out', text: 'out', togglegroup: 'searchBtns' }); searchBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'search', text: 'search', togglegroup: 'searchBtns' });
I don't think the other variables of this panel are of interest hereCode:Ext.applyIf(me, { items: [inBtn, outBtn, searchBtn, searchForm, grid] });
do I need to group them in a container or something? Or does it only work in toolbars? Either way I'm not getting much feedback >.<
-
Best Answer Posted by chramerCode:
inBtn = Ext.create('Ext.button.Button', { xtype: 'button', id: 'in', text: 'in', toggleGroup: 'searchBtns' }); outBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'out', text: 'out', toggleGroup: 'searchBtns' }); searchBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'search', text: 'search', toggleGroup: 'searchBtns' });
-
13 Mar 2012 4:37 AM #2
Code:inBtn = Ext.create('Ext.button.Button', { xtype: 'button', id: 'in', text: 'in', toggleGroup: 'searchBtns' }); outBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'out', text: 'out', toggleGroup: 'searchBtns' }); searchBtn = Ext.create('Ext.button.Button',{ xtype: 'button', id: 'search', text: 'search', toggleGroup: 'searchBtns' });
-
13 Mar 2012 4:49 AM #3


Reply With Quote