PDA

View Full Version : Move splitbar by code



elkidos
16 Jun 2009, 8:52 AM
Hello,

I try to move a splitbar within a borderlayout when I click on a link, with no success.
I tried to set the "setCurrentSize()" method which moves the splitbar, but after that I can't move it anymore.
I also try to adjust the CSS styles of the toolbars and adjacents panels (like top, height, and so on) with little success and some bugs in FF 2.0.

I'm pretty sure someone else has been in the same situation, do you?

And lol, to illustrate the problem, I took few minutes to make two jpeg :D :
1) Initial.jpg : is the initial position
2) AfterClick.jpg : is when you click on "Advanced Options", the splitbar moves down and it shows a div with some options and a button to send a request. Pretty basic.

Thanks!

stardust2k
16 Jun 2009, 9:10 AM
Maybe you should use a formpanel, grouping your advanced options in a fieldset. you can collapse and expand the fieldset in the way you want it i think

Animal
16 Jun 2009, 11:22 AM
Just change the height of the border Panel whether it be north or south (You don't size the center, it automatically takes up whatever is left)

elkidos
17 Jun 2009, 5:48 AM
Well, thanks Animal. To have it works fine I resize the north panel, move the splitbar top position and adjust the grid height in the center panel. For the moment it's fine.

Animal
17 Jun 2009, 6:15 AM
You should only have to resize the north.

Maybe then call doLayout on the Container, but that's all.