Data entry application

We will now add a more complex menu to our data entry application. This menu will allow the user to manage the functionality of the application via the menu in the same manner as they would when using the buttons.

How to do it…

In the following example, we will create a menu that contains an option to exit a window. Create the following text file and save it in your working path with the name address_book.tcl:

 # Load the Tk Package package require Tk # Main Frame frame .main -borderwidth 1 -relief solid -padx 10 -pady 10 # Entry Widgets entry .main.efirst -width 25 entry .main.elast -width 25 entry .main.eaddress -width 50 entry .main.ecity -width 25 entry .main.estate -width 3 entry .main.ezip -width 5 entry .main.ephone ...

Get Tcl/Tk 8.5 Programming Cookbook 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.