summaryrefslogtreecommitdiffstats
path: root/Demo/tix/samples/DirList.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tix/samples/DirList.py')
-rwxr-xr-xDemo/tix/samples/DirList.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Demo/tix/samples/DirList.py b/Demo/tix/samples/DirList.py
index 5fd8c0d..6d28ca3 100755
--- a/Demo/tix/samples/DirList.py
+++ b/Demo/tix/samples/DirList.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 DemoDirList:
# 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 DirList widget. By default it will show the current
# directory
#
#
- top.dir = Tix.DirList(top)
+ top.dir = tkinter.tix.DirList(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 DirList 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
@@ -85,7 +85,7 @@ class DemoDirList:
# 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,
@@ -118,14 +118,14 @@ class DemoDirList:
# outside of the main demo program "tixwidgets.py".
#
if __name__== '__main__' :
- import tkMessageBox, traceback
+ import tkinter.messagebox, traceback
try:
- root=Tix.Tk()
+ root=tkinter.tix.Tk()
RunSample(root)
except:
t, v, tb = sys.exc_info()
text = "Error running the demo script:\n"
for line in traceback.format_exception(t,v,tb):
text = text + line + '\n'
- d = tkMessageBox.showerror ( 'Tix Demo Error', text)
+ d = tkinter.messagebox.showerror ( 'Tix Demo Error', text)