5.3. Fun Things to Try

There aren't too many exciting things you can do with label widgets, but it's a good idea to practice using the entry widget.

  • Create an entry and label combination and display the same information in both. When you put something new in the entry, the label should display it simultaneously.

  • Create a database entry form, labeling each entry with Name, Address, City, State, Zip, Phone. Add an Update button that will perform some error checking on the information in the entry widgets based on the information expected.

  • Create a window with an entry widget and several buttons, each of which does something different to the entry widget. Some suggestions: Clear, Delete Selection, or Default (replace with original string).

  • Create an entry widget and type something in it. Put a button in the window that will reverse the string in the entry widget when pressed.

Get Learning Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.