mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
scrollable frame fix
This commit is contained in:
parent
786a5148de
commit
b177f85328
@ -146,6 +146,12 @@ class CTkScrollableFrame(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBa
|
|||||||
height=self._apply_widget_scaling(self._desired_height))
|
height=self._apply_widget_scaling(self._desired_height))
|
||||||
|
|
||||||
def configure(self, **kwargs):
|
def configure(self, **kwargs):
|
||||||
|
if "width" in kwargs:
|
||||||
|
self._set_dimensions(width=kwargs.pop("width"))
|
||||||
|
|
||||||
|
if "height" in kwargs:
|
||||||
|
self._set_dimensions(height=kwargs.pop("height"))
|
||||||
|
|
||||||
if "corner_radius" in kwargs:
|
if "corner_radius" in kwargs:
|
||||||
new_corner_radius = kwargs.pop("corner_radius")
|
new_corner_radius = kwargs.pop("corner_radius")
|
||||||
self._parent_frame.configure(corner_radius=new_corner_radius)
|
self._parent_frame.configure(corner_radius=new_corner_radius)
|
||||||
@ -180,12 +186,6 @@ class CTkScrollableFrame(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBa
|
|||||||
if "scrollbar_button_hover_color" in kwargs:
|
if "scrollbar_button_hover_color" in kwargs:
|
||||||
self._scrollbar.configure(fg_color=kwargs.pop("scrollbar_button_hover_color"))
|
self._scrollbar.configure(fg_color=kwargs.pop("scrollbar_button_hover_color"))
|
||||||
|
|
||||||
if "width" in kwargs:
|
|
||||||
self._set_dimensions(width=kwargs.pop("width"))
|
|
||||||
|
|
||||||
if "height" in kwargs:
|
|
||||||
self._set_dimensions(height=kwargs.pop("height"))
|
|
||||||
|
|
||||||
if "label_text" in kwargs:
|
if "label_text" in kwargs:
|
||||||
self._label_text = kwargs.pop("label_text")
|
self._label_text = kwargs.pop("label_text")
|
||||||
self._label.configure(text=self._label_text)
|
self._label.configure(text=self._label_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user