Answer the question
In order to leave comments, you need to log in
How to set up frame extension?
Hello. I want to adjust frame scalability when tkinter window is resized.
There are two frames that should expand evenly in length as the width of the main window changes.
As you can see, the frames do not change their size.
I also attach the code that configures them:
left_frame = Frame(self.surf)
right_frame = Frame(self.surf)
input_form = HeaderInputForm(left_frame, self.data)
info_panel = HeaderInfoPanel(right_frame, self.data)
left_frame.grid(row = 0, column = 0, sticky = "W")
right_frame.grid(row = 0, column = 1, sticky = "E")
Answer the question
In order to leave comments, you need to log in
self.surf.grid_columnconfigure(0, weight=1)
self.surf.grid_columnconfigure(1, weight= 1) Indicates
that both columns should expand equally when expanding and shrinking.
If the weights are made, say, 3 and 1, then a column with a weight of three will "eat off" 75% of the additional space, and with a weight of 1 - 25%. If the column weight is 0, it does not resize.
Similarly, there is a .grid_rowconfigure() method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question