PDA

View Full Version : Form positioning



Gualterio
24 Nov 2007, 10:36 AM
I'm new in ExtJs, so I have a very stupid question: How can I do to center a form in the Browser Window? For example, the first form of the "Dynamic Forms Example" (http://extjs.com/deploy/dev/examples/form/dynamic.html). I want to put it in the middle of the screen and I don't know how to do it. Can anyone help me?
Sorry for my English. Sometimes, is not so good.
Thanks in advance.

tryanDLS
24 Nov 2007, 11:04 AM
Assuming your panel has an id='p1'

Ext.getCmp('p1').getEl().center()

Gualterio
24 Nov 2007, 11:19 AM
Thanks. It worked! :)

efege
24 Nov 2007, 2:03 PM
Gualterio, don't worry, your English seems good enough :)