PDA

View Full Version : Question about layout



Jaco Louw
19 Jul 2012, 5:19 AM
Hi guys

Have a question about a layout on a form.

I have a textarea with height: 150px. Under this I have a label. What I would like is to display the label right underneath the "text part of the textarea. Hard to explain, so I have attached a screenshot.

Many thanks!

Jaco

sword-it
20 Jul 2012, 3:58 AM
Hi!

you may try this:-



{
xtype:'fieldset',
autoHeight:true,
title:'Personali',
renderTo: Ext.getBody(),
layout:"column",
items:[
{
xtype:'container'
, layout:'form'
, items:[
{
xtype:'label'
, text:'text for your text area'
},
{
xtype:'label',
text:'your label below text ',
style:'font-weight:bold'
}
]
},
{
xtype:"textarea",
name:"a",
hideLabel:true,
style:'margin-left:20px;',
value:'Your Text Area'
}
]
}



Output:-

http://www.sencha.com/forum/attachment.php?attachmentid=37372&stc=1

Jaco Louw
20 Jul 2012, 8:58 AM
Perfect!
Cheers mate :)

Jaco

james247
14 Dec 2012, 6:21 AM
Nice code this will solve my problem