PDA

View Full Version : How to dynamically rezise the south region of a border layout



sergiu079
27 May 2010, 3:57 AM
Hello,
I want to dynamically resize the south region of a border layout, as if is was resized by the user manually. I want to do this from code. Any suggestions?

CrazyEnigma
27 May 2010, 6:19 AM
The south region is just a panel (http://www.extjs.com/deploy/dev/docs/?class=Ext.Panel). Does that help?

sergiu079
27 May 2010, 7:24 AM
No, :) I'm not that noob. Actually the problem is more complicated, it is related to this issue:
http://www.extjs.com/forum/showthread.php?100269-Grid-scrollbar-issue
If I resize manually the south panel, the GridPanel that is defined as "center" region refreshes somehow its view so the scrollbar is displayed correctly. Maybe I have to create a presentation of this issue and put it on Youtube, because it is very hard to explain in simple words.

CrazyEnigma
27 May 2010, 7:41 AM
I am not too sure why you have to post another thread to get help on the thread that you started. From the two pictures, you are adding a panel at the top, and therefore, sending the grid down the page. You might want to adjust the grid to reflect the changes.

setHeight() perhaps.

sergiu079
27 May 2010, 7:57 AM
I tried that and a lot of other solutions. If it was so simple, I wouldn't ask for help. I think I need somebody that knows better the grid's DOM and how the layout is calculated. The fact that I add a panel to the grid's toolbar(not in northern region) ruins all grid layout( the part that contains the rows). Doing a manual resize, the layout is calculated correct(generally, not in my case). So I think there may reside my solution. There are many events that are fired("resize", "bodyresize","layout","afterlayout"), oneof them does the trick, but I don't have the patience for debugging so deep.

CrazyEnigma
27 May 2010, 10:04 AM
Ok. You asked a simple question, you got a simple answer. If you provided this type of information in the first place, then it might have helped your situation. If you haven't read the STICKY (http://www.extjs.com/forum/showthread.php?66423-****-READ-ME-FIRST-****-Guidelines-FAQs-Resources-etc) and learned to post properly (http://www.extjs.com/learn/Ext_Forum_Help), you might not get the response you did.

Maybe you might want to append your stuff from that thread here. Or close this thread, and bump up the other thread.