[Tutor] Tkinter Entry field text
brandon w
thisisonlyatest at gmx.com
Fri Sep 9 04:31:40 CEST 2011
How do you display text in a Entry field and have it disappear when a
person clicks in it?
This is what I have so far:
from Tkinter import *
root = Tk()
root.title("Password Changer")
root.geometry("300x300+600+250")
label1 = Label(root, text="Enter you password: ")
label1.grid(sticky=W, row=0, column=0)
enter_data1 = Entry(root, bg = "pale green")
enter_data1.grid(row=0, column=1)
enter_data1.insert(0, "password")
root.mainloop()
To get text into this box the person must first delete what is already
in there.
Python 2.6.6
More information about the Tutor
mailing list