| 1 | from Tkinter import *
|
|---|
| 2 | from Dialog import Dialog
|
|---|
| 3 |
|
|---|
| 4 | # this shows how to create a new window with a button in it
|
|---|
| 5 | # that can create new windows
|
|---|
| 6 |
|
|---|
| 7 | class Test(Frame):
|
|---|
| 8 | def printit(self):
|
|---|
| 9 | print "hi"
|
|---|
| 10 |
|
|---|
| 11 | def makeWindow(self):
|
|---|
| 12 | """Create a top-level dialog with some buttons.
|
|---|
| 13 |
|
|---|
| 14 | This uses the Dialog class, which is a wrapper around the Tcl/Tk
|
|---|
| 15 | tk_dialog script. The function returns 0 if the user clicks 'yes'
|
|---|
| 16 | or 1 if the user clicks 'no'.
|
|---|
| 17 | """
|
|---|
| 18 | # the parameters to this call are as follows:
|
|---|
|
|---|