0
tkinterを持つウィンドウを表示しようとしています.Tkinterには、一番下の行全体を占めるフレームがあります。フレームは、ウィンドウの幅全体を占めているが、中段に、上記のコードでウィンドウの一番下の行を占めるTkinterフレーム
import openpyxl, PIL.Image, sys
from tkinter import *
class App(object):
def __init__(self, root):
self.root = root
w, h = root.winfo_screenwidth() * .9, root.winfo_screenheight() * .9
root.geometry("%dx%d+0+0" % (w, h))
root.title('Squirrel Project')
root.wm_iconbitmap('Squirrel.ico')
buttonFrame = Frame(root, width = w, height = 25, padx = 15, pady = 15, bg = 'blue')
buttonFrame.pack(fill = X, expand = True, side = BOTTOM)
saveButton = Button(buttonFrame, text = 'Save', command = self.save).pack(side = LEFT)
:ここ
は、私は今それを持っているようなコードです。 fill = X, expand = True
をbuttonFrame.pack
から削除すると、フレームは一番下の行を占めますが、その一部だけが占有されます。フレームを一番下の行全体に占有させるにはどうしたらいいですか?