mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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
|
|
@ -15,7 +15,7 @@
|
|||
# Your can display the help message in a "balloon" and a status bar widget.
|
||||
#
|
||||
|
||||
import Tix
|
||||
import tkinter.tix
|
||||
|
||||
TCL_ALL_EVENTS = 0
|
||||
|
||||
|
|
@ -32,20 +32,20 @@ class DemoBalloon:
|
|||
z = w.winfo_toplevel()
|
||||
z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
|
||||
|
||||
status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
|
||||
status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
|
||||
status = tkinter.tix.Label(w, width=40, relief=tkinter.tix.SUNKEN, bd=1)
|
||||
status.pack(side=tkinter.tix.BOTTOM, fill=tkinter.tix.Y, padx=2, pady=1)
|
||||
|
||||
# Create two mysterious widgets that need balloon help
|
||||
button1 = Tix.Button(w, text='Something Unexpected',
|
||||
button1 = tkinter.tix.Button(w, text='Something Unexpected',
|
||||
command=self.quitcmd)
|
||||
button2 = Tix.Button(w, text='Something Else Unexpected')
|
||||
button2 = tkinter.tix.Button(w, text='Something Else Unexpected')
|
||||
button2['command'] = lambda w=button2: w.destroy()
|
||||
button1.pack(side=Tix.TOP, expand=1)
|
||||
button2.pack(side=Tix.TOP, expand=1)
|
||||
button1.pack(side=tkinter.tix.TOP, expand=1)
|
||||
button2.pack(side=tkinter.tix.TOP, expand=1)
|
||||
|
||||
# Create the balloon widget and associate it with the widgets that we want
|
||||
# to provide tips for:
|
||||
b = Tix.Balloon(w, statusbar=status)
|
||||
b = tkinter.tix.Balloon(w, statusbar=status)
|
||||
|
||||
b.bind_widget(button1, balloonmsg='Close Window',
|
||||
statusmsg='Press this button to close this window')
|
||||
|
|
@ -64,5 +64,5 @@ class DemoBalloon:
|
|||
self.root.destroy()
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
root = tkinter.tix.Tk()
|
||||
RunSample(root)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue