January 1st, 2004, 12:35 PM
Noob With Widgets
I am currently reading an e-book about python and its coming now to the part about widgets and stuff. I want to know if there is a website of some sort that can show and demenstrate all the different actions you can do with a widget. One in paticular i am having trouble with is clearing out an entry box. Like if the user typed something but then changed his/her mind they could click a button and then it would clear it out by deleting the text in the box. I can figure out how to add text but not how to clear the box. Any help is appreciated though a website for all widgets would help me in the future.
Also, if you used to different programming styles, i am using a style like this...
button = Button(root)
in other words, i am using "bind", for my buttons.
January 1st, 2004, 02:35 PM
I found a website called pythonware.com, and so far its been a big help and i even got my program thing to work. Although, if you still know of some sources that would be great too. Thanks.
January 1st, 2004, 08:40 PM
I will assume you're using Tkinter, and say it is quite easy to clear the contents of an Entry or Text widget. Here is a quick example:
I'm not sure if you need to know how to set up a button to clear the widget, or just what method should be called to do it. If I didn't hit the nail on the head, let me know
#clear an Entry widget
#clear a Text widget