PATH:
usr
/
lib64
/
python2.7
/
Demo
/
tkinter
/
matt
from Tkinter import * from Dialog import Dialog # this shows how to create a new window with a button in it # that can create new windows class Test(Frame): def printit(self): print "hi" def makeWindow(self): """Create a top-level dialog with some buttons. This uses the Dialog class, which is a wrapper around the Tcl/Tk tk_dialog script. The function returns 0 if the user clicks 'yes' or 1 if the user clicks 'no'. """ # the parameters to this call are as follows: d = Dialog( self, ## name of a toplevel window title="fred the dialog box",## title on the window text="click on a choice", ## message to appear in window bitmap="info", ## bitmap (if any) to appear; ## if none, use "" # legal values here are: # string what it looks like # ---------------------------------------------- # error a circle with a slash through it # grey25 grey square # grey50 darker grey square # hourglass use for "wait.." # info a large, lower case "i" # questhead a human head with a "?" in it # question a large "?" # warning a large "!" # @fname X bitmap where fname is the path to the file # default=0, # the index of the default button choice. # hitting return selects this strings=("yes", "no")) # values of the 'strings' key are the labels for the # buttons that appear left to right in the dialog box return d.num def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', command=self.quit) self.QUIT.pack(side=LEFT, fill=BOTH) # a hello button self.hi_there = Button(self, text='Make a New Window', command=self.makeWindow) self.hi_there.pack(side=LEFT) def __init__(self, master=None): Frame.__init__(self, master) Pack.config(self) self.windownum = 0 self.createWidgets() test = Test() test.mainloop()
[-] canvas-gridding.py
[edit]
[-] radiobutton-simple.py
[edit]
[-] canvas-gridding.pyc
[edit]
[-] two-radio-groups.pyo
[edit]
[-] rubber-band-box-demo-1.py
[edit]
[-] rubber-line-demo-1.py
[edit]
[-] canvas-moving-or-creating.pyo
[edit]
[-] 00-HELLO-WORLD.py
[edit]
[-] window-creation-w-location.pyc
[edit]
[-] canvas-moving-w-mouse.py
[edit]
[-] animation-simple.py
[edit]
[-] canvas-moving-w-mouse.pyc
[edit]
[-] canvas-moving-w-mouse.pyo
[edit]
[-] animation-w-velocity-ctrl.py
[edit]
[+]
..
[-] canvas-demo-simple.pyc
[edit]
[-] not-what-you-might-think-2.pyc
[edit]
[-] packer-simple.pyc
[edit]
[-] two-radio-groups.py
[edit]
[-] rubber-line-demo-1.pyc
[edit]
[-] menu-all-types-of-entries.py
[edit]
[-] killing-window-w-wm.pyc
[edit]
[-] README
[edit]
[-] canvas-moving-or-creating.pyc
[edit]
[-] animation-simple.pyo
[edit]
[-] packer-and-placer-together.py
[edit]
[-] animation-w-velocity-ctrl.pyc
[edit]
[-] pong-demo-1.pyc
[edit]
[-] rubber-band-box-demo-1.pyc
[edit]
[-] two-radio-groups.pyc
[edit]
[-] menu-all-types-of-entries.pyc
[edit]
[-] slider-demo-1.py
[edit]
[-] packer-simple.py
[edit]
[-] printing-coords-of-items.pyo
[edit]
[-] dialog-box.pyo
[edit]
[-] entry-simple.pyo
[edit]
[-] subclass-existing-widgets.pyc
[edit]
[-] window-creation-more.pyc
[edit]
[-] dialog-box.pyc
[edit]
[-] not-what-you-might-think-1.pyc
[edit]
[-] radiobutton-simple.pyo
[edit]
[-] canvas-moving-or-creating.py
[edit]
[-] placer-simple.pyc
[edit]
[-] menu-simple.pyo
[edit]
[-] rubber-band-box-demo-1.pyo
[edit]
[-] canvas-gridding.pyo
[edit]
[-] placer-simple.py
[edit]
[-] animation-w-velocity-ctrl.pyo
[edit]
[-] canvas-reading-tag-info.pyo
[edit]
[-] canvas-with-scrollbars.pyc
[edit]
[-] killing-window-w-wm.py
[edit]
[-] window-creation-w-location.py
[edit]
[-] not-what-you-might-think-2.pyo
[edit]
[-] entry-simple.pyc
[edit]
[-] entry-simple.py
[edit]
[-] rubber-line-demo-1.pyo
[edit]
[-] subclass-existing-widgets.pyo
[edit]
[-] window-creation-simple.pyo
[edit]
[-] canvas-mult-item-sel.pyo
[edit]
[-] window-creation-simple.pyc
[edit]
[-] canvas-w-widget-draw-el.pyc
[edit]
[-] canvas-with-scrollbars.pyo
[edit]
[-] window-creation-more.pyo
[edit]
[-] canvas-mult-item-sel.pyc
[edit]
[-] canvas-reading-tag-info.pyc
[edit]
[-] killing-window-w-wm.pyo
[edit]
[-] bind-w-mult-calls-p-type.pyo
[edit]
[-] entry-with-shared-variable.py
[edit]
[-] 00-HELLO-WORLD.pyc
[edit]
[-] canvas-with-scrollbars.py
[edit]
[-] pong-demo-1.pyo
[edit]
[-] window-creation-more.py
[edit]
[-] slider-demo-1.pyc
[edit]
[-] menu-simple.py
[edit]
[-] animation-simple.pyc
[edit]
[-] subclass-existing-widgets.py
[edit]
[-] canvas-w-widget-draw-el.pyo
[edit]
[-] packer-and-placer-together.pyc
[edit]
[-] bind-w-mult-calls-p-type.pyc
[edit]
[-] not-what-you-might-think-1.py
[edit]
[-] not-what-you-might-think-2.py
[edit]
[-] window-creation-simple.py
[edit]
[-] canvas-mult-item-sel.py
[edit]
[-] bind-w-mult-calls-p-type.py
[edit]
[-] entry-with-shared-variable.pyc
[edit]
[-] radiobutton-simple.pyc
[edit]
[-] dialog-box.py
[edit]
[-] menu-all-types-of-entries.pyo
[edit]
[-] canvas-demo-simple.pyo
[edit]
[-] menu-simple.pyc
[edit]
[-] slider-demo-1.pyo
[edit]
[-] canvas-w-widget-draw-el.py
[edit]
[-] 00-HELLO-WORLD.pyo
[edit]
[-] canvas-demo-simple.py
[edit]
[-] packer-simple.pyo
[edit]
[-] printing-coords-of-items.py
[edit]
[-] printing-coords-of-items.pyc
[edit]
[-] canvas-reading-tag-info.py
[edit]
[-] window-creation-w-location.pyo
[edit]
[-] not-what-you-might-think-1.pyo
[edit]
[-] pong-demo-1.py
[edit]
[-] entry-with-shared-variable.pyo
[edit]
[-] packer-and-placer-together.pyo
[edit]
[-] placer-simple.pyo
[edit]