TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
11.33k stars 1.07k forks source link

place() manager with Scrollable Frame #1227

Open FarhanRah opened 1 year ago

FarhanRah commented 1 year ago

If I try to use .grid() or .pack() placement managers with scrollable frame, everything works perfectly, however, with .place() I am unable to see any widgets appear inside of the scrollable frame. This is the code:

import customtkinter

root = customtkinter.CTk()
root.geometry("1200x800")

main_frame = customtkinter.CTkScrollableFrame(root, width=853, height=750, corner_radius=0,
                                                     fg_color="#FFFFFF")
main_frame.place(x=0, y=0)

child_label = customtkinter.CTkLabel(main_frame, text="THIS LABEL", fg_color="#000000")
child_label.place(x=0, y=0)

root.mainloop()
FarhanRah commented 1 year ago

Any update on this? Am I the only one facing this issue?

ElectricCandlelight commented 1 year ago

Seems to be an issues with CTkScrollableFrame. Not had time to look into it fully. Why do you need to use .place()?

FarhanRah commented 1 year ago

Thank you for your response. I am using .place() for all the widgets inside of my frame in order to accurately place them at specific locations. Any idea when will this bug get fixed?

ElectricCandlelight commented 1 year ago

I could be wrong but I don't think it'll get fixed due to the way scrollable frame works.

I still don't see why you can't use grid or pack instead.

In my opinion there is very little reason to ever use place unless you need a widget that's independent of other widgets.