本文整理汇总了Python中application.Application.pack方法的典型用法代码示例。如果您正苦于以下问题:Python Application.pack方法的具体用法?Python Application.pack怎么用?Python Application.pack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.pack方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainApplication
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import pack [as 别名]
class MainApplication(tk.Tk):
"""Container for all frames within the application"""
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
# initialize menu
self.config(menu=MenuBar(self))
self.title("FIFA 16 Auto Buyer")
self.geometry("950x650-5+40")
self.minsize(width=650, height=450)
# bind ctrl+a
if platform == "darwin":
self.bind_class("Entry", "<Command-a>", self.selectall)
else:
self.bind_class("Entry", "<Control-a>", self.selectall)
self.status = StatusBar(self)
self.status.pack(side="bottom", fill="x")
self.status.set_credits("0")
self.appFrame = Application(self)
self.appFrame.pack(side="top", fill="both", expand="True")
def selectall(self, e):
e.widget.select_range(0, tk.END)
return "break"
示例2: MainApplication
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import pack [as 别名]
class MainApplication(tk.Tk):
"""Container for all frames within the application"""
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
#initialize menu
self.config(menu=MenuBar(self))
self.title('FIFA 16 Auto Buyer')
self.geometry('850x650-5+40')
self.minsize(width=650, height=450)
# bind ctrl+a
if(platform == 'darwin'):
self.bind_class("Entry", "<Command-a>", self.selectall)
else:
self.bind_class("Entry", "<Control-a>", self.selectall)
self.status = StatusBar(self)
self.status.pack(side='bottom', fill='x')
self.status.set_credits('0')
self.appFrame = Application(self)
self.appFrame.pack(side='top', fill='both', expand='True')
def selectall(self, e):
e.widget.select_range(0, tk.END)
return 'break'