PDA

View Full Version : putting an Ext.form.Field inside a div?



rocketext
1 Jul 2009, 11:16 AM
Hi guys

I made a form field that takes a username, and I want to be able to put this in a div and float it left (it will be floated next to the title of the field).

In regular HTML it would simply be something like:

<div style="float:left">Username</div>
<div style="float:left">{Ext.form.Field}</div>

My problem is I dont know how to surround the form field with these <div>'s.

Can anyone help me translate this kind of code block to extJS? Or perhaps guide me in the right direction?

cheers

tryanDLS
1 Jul 2009, 11:35 AM
Why are you trying to do that instead of using an Ext label and field per the examples?

rocketext
1 Jul 2009, 11:43 AM
Well i might not put the word username. I might put an icon there instead.

rocketext
2 Jul 2009, 7:08 AM
ok i figured it out.
i can just put the item in a panel.

... how come nobody mentioned that? :(