From f47cf024b2f8a4af8ae78b43f11a2bea582b2638 Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Mon, 6 Feb 2023 12:55:46 +0100 Subject: [PATCH] fixed CTkScrollableFrame and example --- customtkinter/windows/widgets/ctk_scrollable_frame.py | 2 +- examples/scrollable_frame_example.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/customtkinter/windows/widgets/ctk_scrollable_frame.py b/customtkinter/windows/widgets/ctk_scrollable_frame.py index bc9bc7c..685deb2 100644 --- a/customtkinter/windows/widgets/ctk_scrollable_frame.py +++ b/customtkinter/windows/widgets/ctk_scrollable_frame.py @@ -113,7 +113,7 @@ class CTkScrollableFrame(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBa self._parent_frame.grid_columnconfigure(0, weight=1) self._parent_frame.grid_rowconfigure(1, weight=1) self._parent_canvas.grid(row=1, column=0, sticky="nsew", padx=(border_spacing, 0), pady=border_spacing) - self._scrollbar.grid(row=1, column=1, sticky="nsew", padx=border_spacing) + self._scrollbar.grid(row=1, column=1, sticky="nsew", pady=border_spacing) if self._label_text is not None and self._label_text != "": self._label.grid(row=0, column=0, columnspan=2, sticky="ew", padx=border_spacing, pady=border_spacing) diff --git a/examples/scrollable_frame_example.py b/examples/scrollable_frame_example.py index 06e3986..9386f70 100644 --- a/examples/scrollable_frame_example.py +++ b/examples/scrollable_frame_example.py @@ -104,7 +104,8 @@ class App(customtkinter.CTk): # create scrollable radiobutton frame self.scrollable_radiobutton_frame = ScrollableRadiobuttonFrame(master=self, width=500, command=self.radiobutton_frame_event, - item_list=[f"item {i}" for i in range(100)]) + item_list=[f"item {i}" for i in range(100)], + label_text="ScrollableRadiobuttonFrame") self.scrollable_radiobutton_frame.grid(row=0, column=1, padx=15, pady=15, sticky="ns") self.scrollable_radiobutton_frame.configure(width=200) self.scrollable_radiobutton_frame.remove_item("item 3")