Open Mirjax2000 opened 3 months ago
This is a valid problem. Before any new update, you may try the following solution:
Before Scene:
Code example:
from customtkinter import CTkScrollbar
from customtkinter import CTk, CTkScrollableFrame
def padding_in_scrollable(s_frame: CTkScrollableFrame):
"""Adds padding to scrollbar of a scrollable frame."""
if scrollbar:=getattr(s_frame, "_scrollbar", None):
padding = s_frame.cget("border_width") * 2
CTkScrollbar.grid_configure(scrollbar, padx=padding)
if __name__ == "__main__":
app = CTk()
app.geometry("900x600")
s_frame = CTkScrollableFrame(app,
width=400,
height=300,
border_width=2,
fg_color="gray25",
border_color="lightblue")
s_frame.place(relx=0.5, anchor="center", rely=0.5)
padding_in_scrollable(s_frame)
app.mainloop()
Output:
Hope, it will be helpful. Regards.
thank you wizard
You are most welcome.
Regards.