Akascape / CTkXYFrame

A better scrollable frame for customtkinter.
MIT License
47 stars 4 forks source link

Frame cannot be resized #3

Closed JoeGrimes123 closed 1 year ago

JoeGrimes123 commented 1 year ago

I'm still quite new to python so sorry if there is a simple fix for this.

Screenshot: image

Code:

from tkinter import *
import customtkinter, math
from CTkXYFrame import *
from CTkTable import *

customtkinter.set_appearance_mode("System")  # Modes: "System" (standard), "Dark", "Light"
customtkinter.set_default_color_theme("green")  # Themes: "blue" (standard), "green", "dark-blue"

app = customtkinter.CTk()
app.geometry(f"{1600}x{900}") # configure window
app.title("CustomTkinter simple_example.py")

xy_frame = CTkXYFrame(app, width=1200, height=1200) # <-----
xy_frame.grid(row=1, column=5, columnspan=40, padx=10, pady=10, sticky = "nsew")

table = CTkTable(xy_frame, row=7, column=10, values="")
table.grid(row=1, column=5, columnspan=40, padx=10, pady=10, sticky = "nsew")

Issue: I tried to change the width and height but the size still doesn't change from its default value. The same method works perfectly for CTkControllableFrame which is supposed to have the same methods and arguments as CTkXYFrame so I was wondering if I'm missing something

Akascape commented 1 year ago

@JoeGrimes123 Try adding weight in the grid using rowconfigure and columnconfigure.

Also, you can use the pack method instead.