text variable tkinter

Solutions on MaxInterview for text variable tkinter by the best coders in the world

showing results for - "text variable tkinter"
Luigi
19 Aug 2016
1#set a variable and assign it to data type
2v = StringVar()
3
4#put that variable as the textvariable value
5e = Entry(master, textvariable=v)
6
7#then pack it
8e.pack()
9
10#to asign a value to that variable
11v.set("a default value")
12
13#to see the value
14s = v.get()
15print(s)