PDA

View Full Version : dynamic region size



wavel
13 Aug 2007, 7:55 AM
Hello Friends,

I am using nested layout example.
I con not opt for split option where user have to adjust the sizes.

Want to provide a button in toolbar. So that when user clicks on button increase the
north region size grows by say 50. And center region size shrinks by 50.

What should be the best way to do it.


Thanks in advance :)

para
13 Aug 2007, 10:07 AM
I provide splits, but I also provide menu options that resize the layout regions into a predefined pattern. Here's an example of how to do it.



resizeNorthRegion: function() {
var northRegion = layout.getRegion('north');
northRegion.resizeTo(northRegion.panelSize.height + 50);
},

(can't resize center. It is auto-sized to fill up any unused space)

To learn how to do more: Read documentation to determine what functions are available.
Or you can open your page in FF, use FireBug "Scripts" tab to enter variables to watch. When you view a variable, it shows you the available member variables and functions.

Let me know if this helps.