summaryrefslogtreecommitdiffstats
path: root/Demo/tix/samples/PopMenu.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-04 18:53:28 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-04 18:53:28 (GMT)
commitd6d63f543796c48fd9a1f297b860287443687d2e (patch)
tree63875b35c0fc3f1e7280dce75cb12c052915ce69 /Demo/tix/samples/PopMenu.py
parent6cb2bddb85d2cdc16c214b35d795fb60840bcc67 (diff)
downloadcpython-d6d63f543796c48fd9a1f297b860287443687d2e.zip
cpython-d6d63f543796c48fd9a1f297b860287443687d2e.tar.gz
cpython-d6d63f543796c48fd9a1f297b860287443687d2e.tar.bz2
fix a lot of Tkinter imports
Diffstat (limited to 'Demo/tix/samples/PopMenu.py')
-rwxr-xr-xDemo/tix/samples/PopMenu.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Demo/tix/samples/PopMenu.py b/Demo/tix/samples/PopMenu.py
index 32f3229..cb75d85 100755
--- a/Demo/tix/samples/PopMenu.py
+++ b/Demo/tix/samples/PopMenu.py
@@ -12,18 +12,18 @@
# This file demonstrates the use of the tixPopupMenu widget.
#
-import Tix
+import tkinter.tix
def RunSample(w):
# We create the frame and the button, then we'll bind the PopupMenu
# to both widgets. The result is, when you press the right mouse
# button over $w.top or $w.top.but, the PopupMenu will come up.
#
- top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
- but = Tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
- but.pack(expand=1, fill=Tix.BOTH, padx=50, pady=50)
+ top = tkinter.tix.Frame(w, relief=tkinter.tix.RAISED, bd=1)
+ but = tkinter.tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
+ but.pack(expand=1, fill=tkinter.tix.BOTH, padx=50, pady=50)
- p = Tix.PopupMenu(top, title='Popup Test')
+ p = tkinter.tix.PopupMenu(top, title='Popup Test')
p.bind_widget(top)
p.bind_widget(but)
@@ -37,21 +37,21 @@ def RunSample(w):
p.menu.add_command(label='Find', underline=0)
p.menu.add_command(label='System', underline=1)
p.menu.add_command(label='Help', underline=0)
- m1 = Tix.Menu(p.menu)
+ m1 = tkinter.tix.Menu(p.menu)
m1.add_command(label='Hello')
p.menu.add_cascade(label='More', menu=m1)
- but.pack(side=Tix.TOP, padx=40, pady=50)
+ but.pack(side=tkinter.tix.TOP, padx=40, pady=50)
- box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box = tkinter.tix.ButtonBox(w, orientation=tkinter.tix.HORIZONTAL)
box.add('ok', text='Ok', underline=0, width=6,
command=lambda w=w: w.destroy())
box.add('cancel', text='Cancel', underline=0, width=6,
command=lambda w=w: w.destroy())
- box.pack(side=Tix.BOTTOM, fill=Tix.X)
- top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+ box.pack(side=tkinter.tix.BOTTOM, fill=tkinter.tix.X)
+ top.pack(side=tkinter.tix.TOP, fill=tkinter.tix.BOTH, expand=1)
if __name__ == '__main__':
- root = Tix.Tk()
+ root = tkinter.tix.Tk()
RunSample(root)
root.mainloop()