From: Bruce S. <Bru...@nc...> - 2006-02-11 22:09:51
|
Thanks very much for the clear report. It turned out that the controls module never had treated a nonzero minimum correctly. I sent a corrected version of controls.py to Leau. I will of course update VPython to incorporate the corrections. Bruce Sherwood leau2001 wrote: > Hi all, > > I hve a problem with slider. > When i used one, the slider value init=0 and why not the mini i > chose... ? > > Program : > > from visual.controls import * > > c = controls() # Create controls window > > def calcul (d,e): > #result=int(d/e) > print d, e > print txt > > b = slider( pos=(-20,20), width=6, height=20, min=10000, max=100000, > action=lambda: calcul(60000,txt)) # Create a slider in the controls > window: > > > while 1: > c.interact() # Check for mouse events and drive specified > actions > txt=b.value > txt=int(txt) > print txt > #result=60000/txt > #print result > > When you run this program like this, you see the slider value are on > 0... and the when you touch the slider a little, slider value come's > to 10000 as the min value. > But why this slider value is 0 at the beginning and not the min value ? > > thx for help > > lo > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |