Controlling the size of a panel

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc or Python
Post Reply
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Controlling the size of a panel

Post 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
Annik
Posts: 27
Joined: Fri Sep 07, 2012 1:02 pm

Re: Controlling the size of a panel

Post by Annik »

Found it -- used VBox().
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Controlling the size of a panel

Post 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
Post Reply