Home > Enterprise >  is it possible to override the size of a frame when something is inside?
is it possible to override the size of a frame when something is inside?

Time:11-23

I am trying to have two identically sized frames inside a grid, like this: enter image description here

CodePudding user response:

You can use frames to change placement manager like grid to place or pack or vice versa. Like you can fix sizes with place and put them inside whatever you want. This is image normally. This is resized/enlarged.

import tkinter as tk

def value_change(choice):
    global user_choice
    user_choice=choice
    return(user_choice)

user_choice=4
hlavni=tk.Tk()
hlavni.geometry("600x100")#to have enough space to prevent collision.

mainFrame = tk.Frame(hlavni,relief="ridge",borderwidth=4)
#means that. start at parents x and y beginning. Have height of parents            
  • Related