Page 1 of 1

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

Posted: Fri Nov 16, 2007 10:35 am
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

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

Posted: Mon Nov 19, 2007 8:54 am
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

Posted: Mon Nov 19, 2007 11:25 am
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

Posted: Mon Nov 19, 2007 11:41 am
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.