PDA

View Full Version : Align Textfield on the bottom line



DHainzl
1 Mar 2011, 12:15 AM
Hello,

I have an Ext.Textfield with a multi-lined label. Is it possible to align the input-element to the bottom of the whole div? I've attached a image to my post, to describe what I mean ...

anlina
16 Oct 2012, 11:51 PM
dose anyone konw the answer?

jorgeluislay
17 Oct 2012, 12:10 AM
are you trying to set the value of the second textfield with the value of the first textfield ?

Sorry, dont really understand what you want.

anlina
17 Oct 2012, 12:21 AM
when the textfield's fieldLabel is too long it will be :
39419
this i want it like:
39420

jorgeluislay
17 Oct 2012, 1:45 AM
Use this on the form ->

labelAlign : 'top',

You will see the text on top of the box and it will look better.

Otherwise you have to use the "cls" of textfield and define the class in a .css which you are using.

sword-it
18 Oct 2012, 10:43 PM
Hi
May be you should try by overriding the css for class 'x-form-item-body'. Please have a look at the below given example.


var form = Ext.create('Ext.form.Panel', {
title: 'Simple Display',
autoHeight:true,
renderTo: Ext.getBody(),
items:[
{
xtype:'textfield',
fieldLabel:'This is a very very long text for Textfield '
},
{
xtype:'textfield'
, fieldLabel: 'Short-Text'
}
]
});

and the css



.x-form-item-body{
position: relative;
float: none;
vertical-align: bottom !important;
}


thanks