Tkinter slide question
Fred L. Drake
fdrake at cnri.reston.va.us
Tue Jun 29 14:31:50 EDT 1999
David Stokes writes:
> Code snipit:
> Scale(label="Rescan",variable=self.yspeed,orient=HORIZONTAL,).grid(column=0)
>
> currently returns PY_VAR12 instead of the slider value.
David,
Appearantly, you're refering to self.yspeed to get the value of the
variable, although you seem to have initialized self.yspeed with an
instance of Tkinter.StringVar or one of it's friends.
To get the value, use self.yspeed.get(); the object itself is simply
a reference to a Tcl variable. The get() method will return the value
as the data type indicated by the name of the class you instantiated
to create self.yspeed.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives
More information about the Python-list
mailing list