added update_idletasks call to base class set_appearance_mode

This commit is contained in:
Tom Schimansky
2022-11-30 22:03:42 +01:00
parent 50a8bb140e
commit 0d8a79d783
3 changed files with 13 additions and 12 deletions

View File

@ -220,6 +220,7 @@ class CTkBaseClass(tkinter.Frame, CTkAppearanceModeBaseClass, CTkScalingBaseClas
def _set_appearance_mode(self, mode_string):
super()._set_appearance_mode(mode_string)
self._draw()
super().update_idletasks()
def _set_scaling(self, new_widget_scaling, new_window_scaling):
super()._set_scaling(new_widget_scaling, new_window_scaling)

View File

@ -94,6 +94,8 @@ class CTkFrame(CTkBaseClass):
def _draw(self, no_color_updates=False):
super()._draw(no_color_updates)
print("frame draw", no_color_updates)
if not self._canvas.winfo_exists():
return