View Full Version : how to vertically align a display field
Anthony.Hall
6 Sep 2012, 6:15 AM
I have the following display field. The text appears to vertical aligned to the middle. I'd like to align it to the top.
{
xtype:'displayfield',
name:'ToAddress',
height:100,
fieldLabel:'To Address'
},
38507
sword-it
6 Sep 2012, 6:28 AM
Hi Anthony,
You can use labelAlign (left/top/right) config , read following docs
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.Labelable-cfg-labelAlign
Anthony.Hall
6 Sep 2012, 7:13 AM
thanks, i think your close. I need to vertically align 'top' the contents of my displayfield not the label of the display field. if you click on the image link above you'll see what i mean.
friend
6 Sep 2012, 11:37 AM
The alignment you're looking for is controlled by the layout of the parent container. In particular, take a look at the vbox (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.layout.container.VBox) layout.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.