Objective: To practice using GUI widgets from the Tkinter module in Python.

The Assignment Overview

For this lab, you will be modifying the Tkinter examples from lecture 5. The initial code example can be copied from the folder P:\810-063-CSIII\Python Code Examples\lec5.

A useful reference on the Tkinter module can be found at:

http://docs.python.org/lib/module-Tkinter.html

and

http://infohost.nmt.edu/tcc/help/pubs/tkinter/

Activity 1: Add a "Done" button to the EntryTest.py program that prints the contents of both Entry widgets to the IDLE shell when it is pressed.

After you have implemented AND fully tested your modification, raise your hand and demonstrate the it.

Activity 2: Add enough new animals to the Listbox in the ListboxTest.py program to force the y-scrollbar to be used. Refactor the Python code so that it populates the Listbox from a list of animals, e.g., ['cat', 'dog', ...].

After you have implemented AND fully tested your modification, raise your hand and demonstrate it.

Activity 3: Add a line draw option to the "Shape" menu in the CanvasTest.py program. Use the "crosshair" cursor for the line. Details about the canvas line object can be found at:

http://infohost.nmt.edu/tcc/help/pubs/tkinter/create_line.html

After you have implemented AND fully tested your modification, raise your hand and demonstrate it.

NOTE: If you complete all of the activities within the lab period, you do not need to hand anything it. However, if you need to finish activities outside of class , then hand in:

NOTE: If you have not already done so, may sure you can telnet or SSH to student.cs.uni.edu using your CNS account.

(You need a CNS account to submit homework assignments electronically. CNS IT support in Wrt 206, 273-5809)