PDA

View Full Version : Change collapseDirection dynamic for panel



LizMyself
24 Jun 2014, 6:27 AM
Hey all,

I have two panels in a hbox.


If I collapse the first one, the direction should be left or right, so the other one can get the full screen.

If I collapse the secound one, I want to change the collapseDirection of both of them to "top" or "bottom".

But this is not working :(

I tried it like this:
(I'm using Deftjs also, oView is the view I want to change)


oView.header.setRegion("north");
oView.collapse();


and like this:



oView.collapseDirection = "left";
oView.collapse();


and also like this:


oView.collapse("left");



Always my panel disappears :(

My definition in the view:


header:true,
border: false,
collapseMode:'header',
collapseable:true,


May somebody tried this before or can help me?

I can't use the border layout, because I need more than 3 panels in one direction...

mdnaveed42
25 Jun 2014, 4:13 AM
Hi,

I don't have knowledge on Deft js. I have added a fiddle for you using EXT JS 4.2.2
Click here (https://fiddle.sencha.com/#fiddle/710) to check the fiddle.


Hope this helps :)
Thanks,
Md Naveed
\m/

LizMyself
25 Jun 2014, 7:59 AM
Hey yes, this is how it looks.

Now the Problem is.
If both are closed, the collapseDirection of both should change to top.

Is this posible?

mdnaveed42
26 Jun 2014, 9:58 PM
Hi,

Tried it in available time but couldn't achieve it.

Thanks,
Md Naveed
\m/