PDA

View Full Version : Arrange a panel in the middle of a viewport



dejies
11 Apr 2014, 10:23 PM
Hi ,
I am new to Sencha, I am using Extjs 4.2.1
My problem is i am not able to arrange a login form in the middle of a viewport.
i also need to switch views in my viewport.
Which layout should i need to align my login form.
Which method should i need to use to change views.

Can someone help me to fix my issue.
Thanks
Dejies

Farish
11 Apr 2014, 11:58 PM
for your 2nd question, you can use card layout and call setActiveItem() method to change the views. For the 1st one, you can do it with CSS (look up dead center positioning). Dont know how to do it only with ExtJS (you can try with style config). one other possibility is to use a window instead of a panel. windows are centered by default and you can make it non-movable and modal which would make it like a normal panel.

dejies
12 Apr 2014, 8:52 AM
Thanks Farish.

usavahe
12 Apr 2014, 10:38 AM
This is a suggestion. Instead of panel you can use window. You form can appear in the window and when the window pops up, it will be in the center of the viewport.

By default, windows pop centered :>