diff options
| author | Benjamin Peterson <benjamin@python.org> | 2009-01-04 18:53:28 +0000 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2009-01-04 18:53:28 +0000 |
| commit | d6d63f543796c48fd9a1f297b860287443687d2e (patch) | |
| tree | 63875b35c0fc3f1e7280dce75cb12c052915ce69 /Demo/tix/samples/DirTree.py | |
| parent | 6cb2bddb85d2cdc16c214b35d795fb60840bcc67 (diff) | |
| download | cpython-git-d6d63f543796c48fd9a1f297b860287443687d2e.tar.gz | |
fix a lot of Tkinter imports
Diffstat (limited to 'Demo/tix/samples/DirTree.py')
| -rwxr-xr-x | Demo/tix/samples/DirTree.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Demo/tix/samples/DirTree.py b/Demo/tix/samples/DirTree.py index 2e4fe0b957..5411ded212 100755 --- a/Demo/tix/samples/DirTree.py +++ b/Demo/tix/samples/DirTree.py @@ -16,8 +16,8 @@ # installation directory for an application. # -import Tix, os, copy -from Tkconstants import * +import tkinter.tix, os, copy +from tkinter.constants import * TCL_ALL_EVENTS = 0 @@ -40,25 +40,25 @@ class DemoDirTree: # bg = root.tk.eval('tix option get bg') # adding bg=bg crashes Windows pythonw tk8.3.3 Python 2.1.0 - top = Tix.Frame( w, relief=RAISED, bd=1) + top = tkinter.tix.Frame( w, relief=RAISED, bd=1) # Create the DirTree widget. By default it will show the current # directory # # - top.dir = Tix.DirTree(top) + top.dir = tkinter.tix.DirTree(top) top.dir.hlist['width'] = 40 # When the user presses the ".." button, the selected directory # is "transferred" into the entry widget # - top.btn = Tix.Button(top, text = " >> ", pady = 0) + top.btn = tkinter.tix.Button(top, text = " >> ", pady = 0) # We use a LabelEntry to hold the installation directory. The user # can choose from the DirTree widget, or he can type in the directory # manually # - top.ent = Tix.LabelEntry(top, label="Installation Directory:", + top.ent = tkinter.tix.LabelEntry(top, label="Installation Directory:", labelside = 'top', options = ''' entry.width 40 @@ -79,7 +79,7 @@ class DemoDirTree: # Use a ButtonBox to hold the buttons. # - box = Tix.ButtonBox (w, orientation='horizontal') + box = tkinter.tix.ButtonBox (w, orientation='horizontal') box.add ('ok', text='Ok', underline=0, width=6, command = lambda self=self: self.okcmd () ) box.add ('cancel', text='Cancel', underline=0, width=6, @@ -113,5 +113,5 @@ class DemoDirTree: # outside of the main demo program "tixwidgets.py". # if __name__== '__main__' : - root=Tix.Tk() + root=tkinter.tix.Tk() RunSample(root) |
