Page 1 of 1

Controlling the size of a panel

Posted: Tue May 13, 2014 3:10 pm
by Annik
I was wondering if there is a way to specify the size of a panel created with xpanel? That is, setting the size as one would with saving a window

Code: Select all

save_window = new Graph(0)
save_window.size(0,tstop,-90, -50)
{save_window.view(0, -90, tstop, 40, 1020, 30, 300.48, 200.32)}    
Thanks

Re: Controlling the size of a panel

Posted: Tue May 13, 2014 3:43 pm
by Annik
Found it -- used VBox().

Re: Controlling the size of a panel

Posted: Tue May 13, 2014 5:42 pm
by ted
Exactly! And if you find that the box isn't quite the right size, or exactly where you want it to be,
1. stretch it until it's exactly the size you want
2. drag it to where you want it to be
3. use the Print & File Window Manager to save it to a session file all by itself
4. open that session file with a text editor and you'll find a hoc statement that contains the exact measurements and coordinates you need
5. copy and paste those values into your Vbox's map() statement in your hoc file