I seem to be always getting 120 for both height and width, I don't know why it refuses to give me the real value for the width so I can make the maintain the height in a 16:9 ratio
# Monitor frame
self.monitorFrame = ctk.CTkFrame(self)
self.monitorFrame.grid_columnconfigure(0,weight = 1)
self.monitorFrame.grid_rowconfigure(0,weight = 0)
self.monitorFrame.grid_rowconfigure(1,weight = 0)
self.monitorFrame.grid_rowconfigure(2,weight = 0)
self.monitorFrame.grid(row = 0, column = 1, padx = 20, pady = 20, sticky = "nsew")
self.monitorFrame.update()
exeWidth = int(self.monitorFrame.winfo_height()-40)
print(exeWidth)
height = exeWidth/16*9
exeWidth/16*9does not meanexeWidth/(16*9). It means(exeWidth/16)*9.exeWidth = 160andheight = 90.0when running your code (after adding parts to make it a minimal reproducible example).exeWidth = self.monitorFrame["width"]to get the initial width.