Hybrid View
-
26 Feb 2010 6:30 AM #1TheMonolithGuest
field set with column layout
field set with column layout
Please take a look at the attached screenshot.
The code looks like this:
There are two problems:Code:{ xtype:"fieldset", title:"Farbe", autoHeight:true, items: [{ layout:"column", items: [{ columnWidth:0.2, items: [{ xtype:"form", title:"", hideBorders: true, items: [{ xtype:"numberfield", fieldLabel:"C", border: false, bodyBorder: false, name:"numbervalue", width:50 }] }] }] }] }
1) The text field width is not 50% of the field set width. Why not? After all, I included columnWidth:0.5.
2) Why are the borders of the inner form panel still shown? I mean seriously, I used all border-related properties and gave them values that should get rid of them.
P.S. I have spent the last 3 hours on this...
-
26 Feb 2010 6:34 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
I never use such notation but you use a form within a fieldset?? First make a form, give it a column or table layout, than add your fieldsets.
-
26 Feb 2010 6:44 AM #3TheMonolithGuest
But
* I need one field set within a form panel
* the field set should have several columns, hence column layout
* but because the column layout doesn't display field labels for its components, each column must contain a form panel (because it DOES display field labels for its components)
* and these inner form panels (in the listed example it is just one) get a text field each
It is the only way I have found so far that might to what I want it to do.
But if I have misunderstood your explanation, please correct me.
-
28 Feb 2010 12:51 AM #4TheMonolithGuest
Can somebody help me?
-
28 Feb 2010 5:42 AM #5
That's not a FieldSet with a column layout though is it now?
Read it.
It's Fieldset with no layout (And the docs tell you what that means) which contains a Panel which uses column layout.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
1 Mar 2010 1:33 AM #6TheMonolithGuest
Okay, based on your suggestions I managed to simplify the code:
Now the second problem is solved because the borders disapper when I specify "border: false".Code:{ xtype:"fieldset", title:"Legend", autoHeight:true, items: [{ xtype:"panel", title:"", layout:"column", items: [{ xtype:"form", title:"", columnWidth:0.5, items: [{ xtype:"textfield", fieldLabel:"Text", name:"textvalue" }] }] }] }
The first problem persists however. As you can see in the new screenshot that I have attached, the text field is much wider than the specified 20% ("columnWidth: 0.2"). Why?
Also, why is columnWidth not listed in the API documentation of Class Ext.Panel?


Reply With Quote