Setting tk.Frame width and height

Viewed 51857

So I am creating a GUI and I am trying to make it so that everything fits on the screen appropriately. I've drawn a rough sketch of what I want each part of the GUI to look like an it's size, so I know the rough dimensions of everything.

The first problem I am having however is setting up the Left half of the screen.

So the Left half consists of a Frame, which we'll call MainFrame, that consists of 2 Frames, which we'll call LabelFrame and ButtonFrame

  • MainFrame needs to be 385 pixels wide, and 460 pixels tall.
  • LabelFrame should be 375 pixels wide, and 115 pixels tall.
  • ButtonFrame needs to be 375 pixels wide, and 330 pixels tall.

My issue is I have no idea how to set these sizes to the frames.

I've tried self.config(width = num, height = num) obviously replacing num with the appropriate values, but that didn't do anything.

I know with the window itself there is a .geometry method, but I haven't been able to find an equivalent for tk.Frame

3 Answers
Related