本文整理汇总了Python中Tkinter.Frame.pack_configure方法的典型用法代码示例。如果您正苦于以下问题:Python Frame.pack_configure方法的具体用法?Python Frame.pack_configure怎么用?Python Frame.pack_configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Frame
的用法示例。
在下文中一共展示了Frame.pack_configure方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Recherche
# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import pack_configure [as 别名]
class Recherche(Vue):
"""
Vue principal
"""
def __init__(self, fenetre):
"""
Constructeur de la fenetre
"""
self.parent = fenetre
self.frame = Frame(self.parent, borderwidth=1, relief='groove', width=100)
self.frame.pack_configure(side='top', fill='both')
self.frame.pack()
self.titre = Label(self.frame, text=GT_('Url'), font=(20))
self.titre.pack()
self.img = PhotoImage(file="%slogo.gif" % RESSOURCES_PATH)
self.logo = Label(self.frame, image=self.img)
self.logo.pack(pady=(0, 20), side="left")
self.brand = Label(self.frame, text=GT_('WebForge %s' % VERSION), font=(20))
self.brand.pack(pady=(10, 20), padx=(0, 20), side="left")
self.txt_recherche = Entry(self.frame, font=(22))
self.txt_recherche.pack(pady=(0, 20), expand='yes', fill='both', side='left')
self.btn_go = Button(self.frame, text="GO")
self.btn_go.pack(pady=(0, 20), side='right')
self.btn_erase = Button(self.frame, text="X")
self.btn_erase.pack(pady=(0, 20), side='right')
def set_url(self, url):
"""
Set a new url value to the field
"""
self.txt_recherche.insert(0, url)
示例2: Onglet
# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import pack_configure [as 别名]
class Onglet(Vue):
"""
Vue principal
"""
def __init__(self, fenetre):
"""
Constructeur de la fenetre
"""
self.frame = Frame(fenetre, borderwidth=1, relief='groove')
self.frame.pack_configure(side='top', fill='both', expand='yes')
self.frame.pack()
self.titre = Label(self.frame, text=GT_('Onglet'), font=(20))
self.titre.pack()
self.scrollbar = Scrollbar()
self.result = Text(self.frame, yscrollcommand=self.scrollbar)
self.result.tag_configure(
'error',
background='red',
foreground='white',
font='helvetica 15 bold',
relief='raised',
)
self.result.tag_configure(
'result',
background='green',
font='helvetica 15 bold',
relief='raised',
)
self.result.pack(side='top', fill='both', expand='yes')
def set_result(self, liste):
"""
Update parameters list
"""
self.result.delete(0.0, 'end')
for key, value in liste.items():
self.result.insert(
'end',
"%s\n\n" % key,
('result', )
)
# Formate in list properly display all list
# don't display root python list format inline
if type(value) == type(list()):
tmp_value = None
for dictionnaire in value:
tmp_value = '%s%s\n' % (tmp_value, list_display_to_textarea(dictionnaire))
value = tmp_value
value = "%s\n\n\n" % value
self.result.insert('end', value)
def set_error(self, liste):
"""
Update parameters list
"""
self.result.delete(0.0, 'end')
for key, value in liste.items():
self.result.insert('end', "%s\n\n" % key, ('error', ))
self.result.insert('end', value)
示例3: Result
# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import pack_configure [as 别名]
class Result(Vue):
"""
Vue principal
"""
def __init__(self, fenetre):
"""
Constructeur de la fenetre
"""
self.frame = Frame(fenetre, borderwidth=1, relief='groove')
self.frame.pack_configure(side='left', expand='yes', fill='both')
self.frame.pack()
self.titre = Label(self.frame, text=GT_('Resultats'), font=(20))
self.titre.pack()
示例4: Status
# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import pack_configure [as 别名]
class Status(Vue):
"""
Vue principal
"""
def __init__(self, fenetre):
"""
Constructeur de la fenetre
"""
self.frame = Frame(fenetre, borderwidth=1, relief='groove')
self.frame.pack_configure(side='bottom', fill='both')
self.frame.pack()
self.titre = Label(self.frame, text=GT_('Status'), font=(20))
self.titre.pack()
self.progressbar = TkProgessBar(self.frame)
self.progressbar.pack()