source: trunk/essentials/dev-lang/python/Demo/tkinter/matt/dialog-box.py@ 3393

Last change on this file since 3393 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 2.4 KB
Line 
1from Tkinter import *
2from 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
7class 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: