试图放置底部框架,但似乎在左右之间被挤压而不是底部。将全部绑定到窗口大小的帧(可扩展/填充两者(
在填充X/Y/Expandables等上尝试了不同的设置'以及使框架的宽度高度
from tkinter import *
from tkinter import ttk
class Bank(object):
def __init__(self, name, accounts=None):
self.accounts = set(accounts)
self.name = name
class Bank_Gui(object):
def __init__(self, master, bank):
self.master = master
self.bank = bank
self.master.title("Bank")
self.master.geometry("800x600")
self.left = Frame(self.master, borderwidth=5, relief="groove", highlightthickness=15)
self.right = ttk.LabelFrame(self.master, borderwidth=5, relief="groove", text=" Details ")
self.bottom = ttk.LabelFrame(self.master, borderwidth=5, relief="groove", text=" Transaction ")
self.container = ttk.LabelFrame(self.left, borderwidth=5, relief="groove", text=" Customers ")
self.left.pack(side="left", expand=True, fill="both")
self.right.pack(side="right", expand=True, fill="both", padx=10, pady=10)
self.bottom.pack(side="bottom", expand=True, fill="both", padx=10, pady=10)
self.container.pack(expand=True, fill="both", padx=10, pady=10)
root = Tk()
bank_c = Bank("MyBank", [])
bg = Bank_Gui(root, bank_c)
root.mainloop()
在帧方面寻找结果非常相似:http://wildcat.ow2.org/images/bank-gui.png
只是缺少底部框架.. Kinda
我自己设法解决了它,只是制作了另一个帧"中心",然后将左右框架放入其中,然后仅使用两个帧"中心"one_answers"底部"将它们放在另一个框架上工作。(顶部,顶部(