示例#1
0
 def __init__(self, appname, message):
     PopupWindow.__init__(self, appname, 'Busy')
     self.protocol('WM_DELETE_WINDOW', lambda:0)        # ignore deletes
     label = Label(self, text=message + '...')          # win.quit() to erase
     label.config(height=10, width=40, cursor='watch')  # busy cursor
     label.pack()
     self.makeModal()
     self.message, self.label = message, label
示例#2
0
 def __init__(self, appname, message):
     PopupWindow.__init__(self, appname, 'Busy')
     self.protocol('WM_DELETE_WINDOW', lambda: 0)  # ignore deletes
     label = Label(self, text=message + '...')  # win.quit() to erase
     label.config(height=10, width=40, cursor='watch')  # busy cursor
     label.pack()
     self.makeModal()
     self.message, self.label = message, label
示例#3
0
 def __init__(self, appname, helptext, iconfile=None, showsource=lambda:0):
     PopupWindow.__init__(self, appname, 'Help', iconfile)
     from tkinter.scrolledtext import ScrolledText    # a nonmodal dialog
     bar  = Frame(self)                               # pack first=clip last
     bar.pack(side=BOTTOM, fill=X)
     code = Button(bar, bg='beige', text="Source", command=showsource)
     quit = Button(bar, bg='beige', text="Cancel", command=self.destroy)
     code.pack(pady=1, side=LEFT)
     quit.pack(pady=1, side=LEFT)
     text = ScrolledText(self)                   # add Text + scrollbar
     text.config(font=self.myfont)
     text.config(width=self.mywidth)             # too big for showinfo
     text.config(bg='steelblue', fg='white')     # erase on btn or return
     text.insert('0.0', helptext)
     text.pack(expand=YES, fill=BOTH)
     self.bind("<Return>", (lambda event: self.destroy()))
示例#4
0
 def __init__(self, appname, helptext, iconfile=None, showsource=lambda: 0):
     PopupWindow.__init__(self, appname, 'Help', iconfile)
     from tkinter.scrolledtext import ScrolledText  # a nonmodal dialog
     bar = Frame(self)  # pack first=clip last
     bar.pack(side=BOTTOM, fill=X)
     code = Button(bar, bg='beige', text="Source", command=showsource)
     quit = Button(bar, bg='beige', text="Cancel", command=self.destroy)
     code.pack(pady=1, side=LEFT)
     quit.pack(pady=1, side=LEFT)
     text = ScrolledText(self)  # add Text + scrollbar
     text.config(font=self.myfont)
     text.config(width=self.mywidth)  # too big for showinfo
     text.config(bg='steelblue', fg='white')  # erase on btn or return
     text.insert('0.0', helptext)
     text.pack(expand=YES, fill=BOTH)
     self.bind("<Return>", (lambda event: self.destroy()))
示例#5
0
文件: popuputil.py 项目: bjshan/pp4e
	def __init__(self, appname, helptext, iconfile=None, showsource=lambda:0):
		PopupWindow.__init__(self, appname, 'Help', iconfile)
		from tkinter.scrolltext import ScrolledText
		bar = Frame(self)
		bar.pack(side=BOTTOM, fill=X)
		code = Button(bar, bg='beige', text="Source", command=showsource)
		quit = Button(bar, bg='beige', text='Cancel', command=self.destroy)
		code.pack(pady=1, side=LEFT)
		quit.pack(pady=1, side=LEFT)
		text = ScrolledText(self)
		text.config(font=self.myfont)
		text.config(width=self.mywidth)
		text.config(bg='steelblue', fg='white')
		text.insert('0.0', helptext)
		text.pack(expand=YES, fill=BOTH)
		self.bind("<Return>", (lambda event: self.destroy()))
示例#6
0
 def __init__(self, config=ClockConfig, name=''):
     PopupWindow.__init__(self, appname, name)
     clock = Clock(config, self)
     clock.pack(expand=YES, fill=BOTH)
示例#7
0
文件: clock.py 项目: liubiggun/PP4E
 def __init__(self, config=ClockConfig, name=''):
     PopupWindow.__init__(self, appname, name)
     clock = Clock(config, self)
     clock.pack(expand=YES, fill=BOTH)