From: Bruce S. <bas...@un...> - 2004-01-17 16:33:42
|
In the current version of VPython there is a module "controls" which lets you create sliders and buttons (albeit a bit primitive). You could pick up the current visual zip file from "Files useful on all platforms" and try it; I think it will run with Python 2.2 (but I might be wrong -- maybe it needs Python 2.3; it uses "properties"). It isn't documented but should be that gdots and other graph objects have attributes that let you get at their parents. For example: g = gdots() g.gdisplay is the gdisplay within which this gdots object was created. g.gdisplay.display is the Visual display within which the graph is displayed, which means that gdots.gdisplay.display.visible = 0 will get rid of the graph window. for obj in g.gdisplay.display.objects: obj.color = color.red # turns everything red Bruce Sherwood Cornelius Sicker wrote: > Hi, > i'm using Win2k, Python 2.2.2 and VPython 2002-12-12. > I simply want to implement a slider, which controls the value of a variable, but i don't know how to do this. > Is there also an easy way to inscribe the slider (title) and show its current value? > Another problem I have is the following: I use the gdots function of visual.graph to plot some dots in a gdisplay. How can I clear the display? > > Thanks for your help. > -Cornelius > ______________________________________________________________________________ > Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den > Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |