summaryrefslogtreecommitdiffstats
path: root/Demo/tix/samples/Balloon.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tix/samples/Balloon.py')
-rwxr-xr-xDemo/tix/samples/Balloon.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Demo/tix/samples/Balloon.py b/Demo/tix/samples/Balloon.py
index 2295905..bc25a2e 100755
--- a/Demo/tix/samples/Balloon.py
+++ b/Demo/tix/samples/Balloon.py
@@ -15,7 +15,7 @@
# Your can display the help message in a "balloon" and a status bar widget.
#
-import Tix
+import tkinter.tix
TCL_ALL_EVENTS = 0
@@ -32,20 +32,20 @@ class DemoBalloon:
z = w.winfo_toplevel()
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
- status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
- status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
+ status = tkinter.tix.Label(w, width=40, relief=tkinter.tix.SUNKEN, bd=1)
+ status.pack(side=tkinter.tix.BOTTOM, fill=tkinter.tix.Y, padx=2, pady=1)
# Create two mysterious widgets that need balloon help
- button1 = Tix.Button(w, text='Something Unexpected',
+ button1 = tkinter.tix.Button(w, text='Something Unexpected',
command=self.quitcmd)
- button2 = Tix.Button(w, text='Something Else Unexpected')
+ button2 = tkinter.tix.Button(w, text='Something Else Unexpected')
button2['command'] = lambda w=button2: w.destroy()
- button1.pack(side=Tix.TOP, expand=1)
- button2.pack(side=Tix.TOP, expand=1)
+ button1.pack(side=tkinter.tix.TOP, expand=1)
+ button2.pack(side=tkinter.tix.TOP, expand=1)
# Create the balloon widget and associate it with the widgets that we want
# to provide tips for:
- b = Tix.Balloon(w, statusbar=status)
+ b = tkinter.tix.Balloon(w, statusbar=status)
b.bind_widget(button1, balloonmsg='Close Window',
statusmsg='Press this button to close this window')
@@ -64,5 +64,5 @@ class DemoBalloon:
self.root.destroy()
if __name__ == '__main__':
- root = Tix.Tk()
+ root = tkinter.tix.Tk()
RunSample(root)