-
17 Dec 2012 2:56 PM #1
Answered: How to stretch items inside a Segmented Button to 100%?
Answered: How to stretch items inside a Segmented Button to 100%?
Heya!
My first post!
Basically I have a Segmentedbutton that looks like this,
And my question is, How do i strech the items within to 100% without specify 33.3%?
And another question, Is it possible to have the items on diffrent rows? like 3 items on one row and 4 on the next and still keep it stretched?
And if its possible, as you can see in this image, I want the two rows to be merged together and stretch 100%, I don't want to see the rounded corners at the end.
Is anything of this possible?
tehapp_advancedsearch.jpg
Thanks guys!Code:xtype: 'segmentedbutton', allowMultiple: true, docked: 'top', layout: { type: 'hbox', pack: 'center', align: 'stretchmax', labelWidth: '100%' }, items: [ { text: 'Title', width: '33.3%', labelWidth: '100%', modal: true }, { text: 'Date', width: '33.3%', labelWidth: '100%', modal: true }, { text: 'Release date', width: '33.3%', labelWidth: '100%', modal: true } ]
Regards
Joachim
-
Best Answer Posted by mitchellsimoensCode:
Ext.Viewport.add({ xtype : 'toolbar', docked : 'top', items : [ { xtype : 'segmentedbutton', flex : 1, defaults : { flex : 1 }, items : [ { text : 'One' }, { text : 'Two' }, { text : 'Three' } ] } ] });
-
19 Dec 2012 7:28 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
Code:Ext.Viewport.add({ xtype : 'toolbar', docked : 'top', items : [ { xtype : 'segmentedbutton', flex : 1, defaults : { flex : 1 }, items : [ { text : 'One' }, { text : 'Two' }, { text : 'Three' } ] } ] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Dec 2012 12:50 PM #3
I love you mate!
Worked like a charm!
Thanks alot!


Reply With Quote