-
20 May 2012 2:00 PM #1
Unanswered: Form content too wide for screen
Unanswered: Form content too wide for screen
Hi experts,
I only just started working with Sencha Touch 2 and now ran into my first problem I couldn't figure out myself.
I created a view which extends Ext.form.Panel. This view contains a couple of elements in the following structure:- fieldset
- a couple of checkboxfields
- fieldset
- sliderfield (minValue 0, maxValue 24)
- textareafield
- button
I tried to figure out which controls are causing the problems and was able to narrow it down to the textarea and the slider. If I delete the second fieldset everything is fine. If I leave the slider only, it's just a bit too wide and if I delete the slider only it has the behaviour described above.
That's how I configured these to elements:
Any hint what I could do or why this is happening?Code:{ xtype: 'sliderfield', label: 'Wie lange verwenden Sie Ihr Smartphone pro Tag?', minValue: 0, maxValue: 24, name: 'duration' }, { xtype: 'textareafield', label: 'Erzählen Sie uns eine Geschichte im Zusammenhang mit Ihrem Smartphone.', name: 'story' }
Cheers,
Michael
- fieldset
-
22 May 2012 5:35 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
- Answers
- 3113
Can I see a complete test case? I believe I have seen a bug in the bugs forum that seems to be related.
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.
-
22 May 2012 6:07 AM #3
I kind of fixed it in the meantime by adding labelWrap: true, which works but doesn't look very nice. Here the complete page. Don't be confused by the german labels, I was just too lazy to change it to English

In my app.js I have this to activate this view:Code:Ext.define("sencha-touch.view.Page2", { extend: 'Ext.form.Panel', requires: [ 'Ext.TitleBar', 'Ext.form.FieldSet', 'Ext.field.Hidden' ], config: { title: 'Welcome', iconCls: 'home', id: 'formPage2', styleHtmlContent: true, scrollable: true, items: [ { docked: 'top', xtype: 'titlebar', title: 'EBT Umfrage' }, { docked: 'bottom', xtype: 'titlebar', title: '© 2012' }, { xtype: 'fieldset', title: 'Wozu nutzen Sie ihr Smartphone?', items: [ { xtype: 'checkboxfield', name : 'email', label: 'E-Mail' }, { xtype: 'checkboxfield', name : 'social', label: 'Social Media' }, { xtype: 'checkboxfield', name : 'surfing', label: 'Surfen' }, { xtype: 'checkboxfield', name : 'phone', label: 'Telefonieren' }, { xtype: 'checkboxfield', name : 'sms', label: 'SMS' }, { xtype: 'checkboxfield', name : 'gaming', label: 'Gaming' }, { xtype: 'hiddenfield', label: 'id', id: 'id', name: 'remoteid' } ] }, { xtype: 'fieldset', items: [ { xtype: 'sliderfield', label: 'Wie lange verwenden Sie Ihr Smartphone pro Tag?', minValue: 0, maxValue: 24, name: 'duration' }, { xtype: 'textareafield', label: 'Erzählen Sie uns eine Geschichte im Zusammenhang mit Ihrem Smartphone.', name: 'story' } ] }, { xtype: 'button', text: 'Umfrage beenden', id: 'buttonPage2' } ], fullscreen: true } });
Cheers,Code:Ext.Viewport.add(Ext.create('sencha-touch.view.Page2'));
Michael
-
29 Jul 2012 4:40 AM #4
Try adding text-overflow: ellipsis to the labels' styling
-
30 Jul 2012 5:37 AM #5
Yeah, I've got the same problems. When labels are 'longer' than the width of the screen the form will stretch.


Reply With Quote