mardi 7 février 2017

How to store python scale's user set value into variable

Vote count: 0

I am new to python and I have some problems storing the values of the "sliders" into variables.

I want to user to set the value he wants to work with and that number will be stored into a variable, with which the program could work later on.

here is my code:

from Tkinter import *

root = Tk()

scale = Scale( root, variable = kassza ) scale.pack(anchor=CENTER)

kassza = scale.get()

button = Button(root, text="Get Scale Value") button.pack(anchor=CENTER)

label = Label(root) label.pack()

def qu(): root.quit()

gomb = Button(root, text="Spin",command = qu) gomb.pack()

root.mainloop()

asked 33 secs ago

Let's block ads! (Why?)



How to store python scale's user set value into variable

Aucun commentaire:

Enregistrer un commentaire