View Full Version : FieldSet: setting buttonAlign? remove/limit the spaces bet. textfield and fieldLabel?

22 Dec 2009, 12:55 AM
1) even though I set the Search buttonAlign to 'right'... still go to left align....?
2) how to limit the spaces between the fieldLabel 'Route' and xtype 'textfield'?
* would like to align my label to the leftmost
* and automatically follow the textfield right after the label

here's the fieldset code:

xtype: 'fieldset',
title: 'Condition',
autoHeight: true,
autoWidth: true,
buttonAlign: 'right',
items: [{

xtype: 'textfield',
fieldLabel: 'Route:',
name: 'search.route'

xtype: 'button',
text: 'Search',
handler: function () {
Ext.Msg.alert('Search', 'Search button click');

22 Dec 2009, 4:21 AM
you need to set the labelAlign property.

buttonAlign seems to work fine for me:

new Ext.Window({
layout : 'fit',
width : 300,
height : 300,
items : {
xtype : 'fieldset',
buttonAlign : 'right',
buttons : [


are you using the latest code?

22 Dec 2009, 4:30 PM
it works fine... by using the buttons: [...]
but using the xtype : 'button' doesn't work...


22 Dec 2009, 4:35 PM
thanks a lot for the solution for buttonAlign...

could you please check it also the spaces between the fieldLabel and xtype textfield....

my expected result is:

Route: textFieldElement <- leftAligned depends on the fieldLabel

22 Dec 2009, 4:36 PM
Yes I am, it's 3.1.0 Sir, just migrated from 2.3.0

are you using the latest code?