Diana Hawksworth wrote:
Hi! I need help on blocking user access to a message box - for example,
the program could provide an answer to an input. At the moment, the
user has access to - and can type into - that "answer" space. How do I
prevent that from happening please?
Are you using Tkinter?
You could bind '<Key>' to nothing in the entry widget. eg:
self.answer = Tkinter.Entry(master)
def noop(e):
return 'break'
self.answer.bind('<Key>', noop)
--- actually, scratch that. For Tkinter, just make the widget disabled.
self.answer.config(state=Tkinter.DISABLED)
Just remember that it needs to be enabled when you put the answer in.
--
John.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor