本文整理汇总了Python中Tkinter.Tk.lower方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.lower方法的具体用法?Python Tk.lower怎么用?Python Tk.lower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Tk
的用法示例。
在下文中一共展示了Tk.lower方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import lower [as 别名]
def main():
root = Tk() # create tkinter window
root.lower() # send tkinter window to back
# create main app
app = App(root)
# Bring GUI to front # app.master = root
root.lift() # bring tk window to front if initialization finishes
root.focus_force() # make tk window active one (so you don't need to click on it for hotkeys to work)
root.mainloop() # start Tkinter GUI loop
示例2: TkApplicationWindow
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import lower [as 别名]
class TkApplicationWindow(AbstractApplicationWindow):
def __init__(self, app):
self.root = Tk()
self.root.title("Llia")
self.root.config(background=factory.bg())
super(TkApplicationWindow, self).__init__(app, self.root)
self.root.withdraw()
if app.config()["enable-splash"]:
splash = TkSplashWindow(self.root, app)
self.root.deiconify()
self.root.protocol("WM_DELETE_WINDOW", self.exit_app)
self.llia_graph = None
self._main = layout.BorderFrame(self.root)
self._main.config(background=factory.bg())
self._main.pack(anchor="nw", expand=True, fill=BOTH)
self._progressbar = None
self._init_status_panel()
self._init_menu()
self._init_center_frame(self._main.center)
self.root.minsize(width=665, height=375)
self.group_windows = []
self.add_synth_group()
self._scene_filename = ""
def _init_status_panel(self):
south = self._main.south
south.configure(padx=4, pady=4)
self._lab_status = factory.label(south, "", modal=False)
b_panic = factory.panic_button(south)
b_down = factory.button(south, "-")
b_up = factory.button(south, "+")
b_panic.grid(row=0, column=0)
self._progressbar = Progressbar(south,mode="indeterminate")
self._progressbar.grid(row=0,column=PROGRESSBAR_COLUMN, sticky='w', padx=8)
self._lab_status.grid(row=0,column=4, sticky='w')
south.config(background=factory.bg())
b_down.configure(command=lambda: self.root.lower())
b_up.configure(command=lambda: self.root.lift())
self.update_progressbar(100, 0)
def _tab_change_callback(self, event):
self.llia_graph.sync()
def _init_center_frame(self, master):
nb = ttk.Notebook(master)
nb.pack(expand=True, fill="both")
frame_synths = layout.FlowGrid(nb, 6)
frame_efx = layout.FlowGrid(nb, 6)
frame_controllers = layout.FlowGrid(nb, 6)
self.llia_graph = LliaGraph(nb, self.app)
nb.add(frame_synths, text = "Synths")
nb.add(frame_efx, text = "Effects")
nb.add(frame_controllers, text = "Controllers")
nb.add(self.llia_graph, text="Graph")
nb.bind("<Button-1>", self._tab_change_callback)
def display_info_callback(event):
sp = event.widget.synth_spec
msg = "%s: %s" % (sp["format"],sp["description"])
self.status(msg)
def clear_info_callback(*_):
self.status("")
for st in con.SYNTH_TYPES:
sp = specs[st]
ttp = "Add %s Synthesizer (%s)" % (st, sp["description"])
b = factory.logo_button(frame_synths, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_synth_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_synths.add(b)
for st in con.EFFECT_TYPES:
sp = specs[st]
ttp = "Add %s Effect (%s)" % (st, sp["description"])
b = factory.logo_button(frame_efx, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_efx_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_efx.add(b)
for st in con.CONTROLLER_SYNTH_TYPES:
sp = specs[st]
ttp = "Add %s Effect (%s)" % (st, sp["description"])
b = factory.logo_button(frame_controllers, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_controller_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_controllers.add(b)
@staticmethod
def menu(master):
m = Menu(master, tearoff=0)
m.config(background=factory.bg(), foreground=factory.fg())
return m
def _init_menu(self):
#.........这里部分代码省略.........