I have this code of a frame in customTkinter
version 5.2.0
:
import customtkinter as ctk
# window
window = ctk.CTk()
window.geometry('400x300')
# widget
frame = ctk.CTkFrame(window)
frame.place(relx = 0.5, rely = 0.5, width = 20, anchor = 'center')
# run
window.mainloop()
But for some reasons it gives me the error:
'width' and 'height' arguments must be passed to the constructor of the widget, not the place method
In tkinter this works just fine, and I also saw people that use the place
method in this exactly way with the same library and don't have my problem: python tkinter place method from right
I also tried to use width
in both place
and the definition of the frame, but this didn't work. I can't use relwidth
or relheight
because lately I want to resize the frame in a particular way with the window.