Ext


Go Back   Ext JS Forums > Ext JS Community Forums (3.0) > Ext: Help

Reply
 
Thread Tools
  #1  
Old 11-05-2009, 04:57 AM
nicobarten nicobarten is offline
Ext User
 
Join Date: Jul 2009
Location: The Netherlands
Posts: 77
nicobarten is on a distinguished road
Default FieldLabel problem in fieldset with columnlayout

Hi all.

I have a fieldset with a column layout. In the fieldset i have 2 columns, with each a formpanel, which again contains the form items. In column 1 i use form items like combo's and textfields which uses fieldlabels, this all works well. However, in column 2 i need form items like combo's WITHOUT a fieldlabel. I tried a displayField and a textarea, and although they are rendered at the correct height, there is a 'gap' (space of around 100-200px i guess) at the left of the items. What i want is this space to be removed, so the items (the displayfield and textarea) go further to the left.

Code:
                xtype: 'fieldset',
                layout: 'column',
                title: 'Uren',
                items: [
                {
                    xtype: 'panel',
                    layout: 'form',
                    border: true,
                    width: 290,
                    items: [
                    {
                        xtype: 'combo',
                        store: new Ext.data.ArrayStore(
                        {
                            fields: ['bedrijfsnaam'],
                            data: [['Microsoft'],['KPN'],['Vodafone'],['Eneco']]
                        }),
                        value: 'Microsoft',
                        valueField: 'bedrijfsnaam',
                        displayField: 'bedrijfsnaam',
                        mode: 'local',
                        triggerAction: 'all',
                        fieldLabel: 'Bedrijf',
                        width: 150
                    },
                    {
                        xtype: 'combo',
                        store: new Ext.data.ArrayStore(
                        {
                            fields: ['urensoort'],
                            data: [['Declarabel'],['Verlof'],['Bijzonder'],['Ziek'],['Tandarts'],['Huisarts']]
                        }),
                        value: 'Declarabel',
                        valueField: 'urensoort',
                        displayField: 'urensoort',
                        mode: 'local',
                        triggerAction: 'all',
                        fieldLabel: 'Urensoort',
                        width: 150
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Van',
                        width: 150
                    },
                    {
                        xtype: 'textfield',
                        fieldLabel: 'Tot',
                        width: 150
                    }]
                },
                {
                    xtype: 'panel',
                    layout: 'form',
                    border: true,
                    items: [
                    {
                        xtype: 'displayfield',
                        value: 'Omschrijving:'
                    },
                    {
                        xtype: 'textarea',
                        width: 200
                    }]
                }]
See the attached thumbnail for the problem.
Attached Images
File Type: jpg fieldlabel.jpg (13.6 KB, 15 views)
Reply With Quote
  #2  
Old 11-05-2009, 06:07 AM
attu attu is offline
Ext User
 
Join Date: Aug 2008
Posts: 41
attu is on a distinguished road
Default

Hi!

You might use the property
hideLabel:true,
in your textarea.
Bye!
Reply With Quote
  #3  
Old 11-05-2009, 06:13 AM
dommellenny's Avatar
dommellenny dommellenny is offline
Ext User
 
Join Date: Oct 2009
Location: Geel, Belgium
Posts: 19
dommellenny is on a distinguished road
Send a message via MSN to dommellenny
Default

hi,
attu is right,
but also use
hidelabel: true,
in your displayfield
and they will both be nicely placed aside the other formObjects
Reply With Quote
  #4  
Old 11-05-2009, 09:29 AM
nicobarten nicobarten is offline
Ext User
 
Join Date: Jul 2009
Location: The Netherlands
Posts: 77
nicobarten is on a distinguished road
Default

wow, how could i miss that!

Thank you very much!
Reply With Quote
  #5  
Old 11-05-2009, 09:32 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

Or simple do not use

                    layout: 'form',
In that second column. It's the form layout which does that.

Also, do not use Panels as the columns. Use xtype: 'container' (And apply a class to get the border that you want)
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 11:28 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.