Is it possible to set the title of a Graph window?

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
joe1234
Posts: 8
Joined: Fri Sep 28, 2007 6:46 am
Location: England

Is it possible to set the title of a Graph window?

Post by joe1234 »

Hi,
I'm making graphs in the NEURON GUI (programmatically, via hoc) of the parameters of my home-made NMODL schemes. I would like to be able to change the window titles from the default such as "Graph[0] x-50:550 ..." to a title of my own. I haven't found anything through heavy searching of the documentation etc, so maybe it simply isn't an available feature?
Thanks for any help!
Joe
ted
Site Admin
Posts: 6393
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Is it possible to set the title of a Graph window?

Post by ted »

Good question.

Wrap the Graph inside an HBox or a VBox.
Example:

Code: Select all

objref vb, g
vb = new VBox()
vb.intercept(1)
g = new Graph()
vb.intercept(0)
vb.map("Your Title Here")
For more info, see the documentation of VBox
http://www.neuron.yale.edu/neuron/stati ... /vbox.html
joe1234
Posts: 8
Joined: Fri Sep 28, 2007 6:46 am
Location: England

Post by joe1234 »

Thanks a lot Ted, that works beautifully! (I'm working on Windows XP)
BTW, the programmer's ref says it doesn't work under MS Windows (http://www.neuron.yale.edu/neuron/stati ... x.html#map)

Joe
ted
Site Admin
Posts: 6393
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

I just tried labeling a VBox under XP and sure enough, it works quite well. Thanks for tipping
me off, Joe. That bug is probably from before the MSWin version started using cygwin, so
the documentation will need updating.
Post Reply