From 9fcd963fd28bbb1838bdccf7c4e7a6e9fe10418b Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Sun, 22 Jan 2023 22:00:18 +0100 Subject: [PATCH] prevent width and height args in place method #1094 --- .../windows/widgets/core_widget_classes/ctk_base_class.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/customtkinter/windows/widgets/core_widget_classes/ctk_base_class.py b/customtkinter/windows/widgets/core_widget_classes/ctk_base_class.py index a75ab01..c401c3d 100644 --- a/customtkinter/windows/widgets/core_widget_classes/ctk_base_class.py +++ b/customtkinter/windows/widgets/core_widget_classes/ctk_base_class.py @@ -269,6 +269,8 @@ class CTkBaseClass(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBaseClas relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ + if "width" in kwargs or "height" in kwargs: + raise ValueError("'width' and 'height' arguments must be passed to the constructor of the widget, not the place method") self._last_geometry_manager_call = {"function": super().place, "kwargs": kwargs} return super().place(**self._apply_argument_scaling(kwargs))