prevent width and height args in place method #1094

This commit is contained in:
Tom Schimansky 2023-01-22 22:00:18 +01:00
parent 4b600b9179
commit 9fcd963fd2
1 changed files with 2 additions and 0 deletions

View File

@ -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))