From: Gary P. <pa...@in...> - 2004-01-17 16:41:55
|
> 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 I'm trying to do something similar, with mixed success. My approach has been to build a Tkinter application that controls a vpython window. I'm trying to use the Tkinter gui to read and set values in vpython. For example, I'm trying to display a bar representing the value of a variable (energy) by using a Tkinter.Canvas.Rectangle widget. If it works, the idea is to build a Tkinter gui that controls and displays lots of different vpython parameters. So far I've had some success setting parameters in the gui and having vpython respond correctly. Less luck having the gui display values from vpython in realtime. Question for the experts: does this approach have any prayer or working? I'm concerned about having dueling Tkinter applications (mine and the vpython window). I'm wondering with trepidation if I should explore threads ... -gary |