mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
fix a lot of Tkinter imports
This commit is contained in:
parent
6cb2bddb85
commit
d6d63f5437
76 changed files with 536 additions and 536 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue