Just reading drawingTool.py presented in class as well as the code this assignment starts from should already teach you most of what you need.
application.py (see Figure 1) implements
the controlling part of a prototype spreadsheet application. It allows one to open Grid View windows, Plot View (dummy implementation) windows, as well as quit the application.
SSGridView.py (see Figure 2) implements the
core classes for the Grid View.
The functionality of the application was demonstrated in class and is described briefly in the source.
<shift><click> the links above to download the files.
Extend the above with:
Hint: a tiny example of the use of the Entry widget
from Tkinter import * root=Tk() # the root window typedText=StringVar() typedText.set("initial text") e=Entry(root, textvariable=typedText) e.pack() # you can get the text typed into the Entry field by means of typedText.get() # the main Tk event loop root.mainloop()
Hint: have a close at how onDrawareaMouseMove() and onDrawareaMouse1Click handle mouse motion and subsequent cell selection.
Hint: you will have to modify the class DataElement to accommodate different types of data values.
Clearly identify and document your additions. ANY change you make to the code must be accompanied by comments containing the word MODIFIED literally (and some explanation).