From d0622f63426c06e1666e68d058d4ae51c53b0838 Mon Sep 17 00:00:00 2001 From: Supercam19 <79729769+supercam19@users.noreply.github.com> Date: Sun, 22 Jan 2023 13:31:21 -0500 Subject: [PATCH] Add a few comments --- customtkinter/windows/ctk_tooltip.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/customtkinter/windows/ctk_tooltip.py b/customtkinter/windows/ctk_tooltip.py index 94b176d..7cd3479 100644 --- a/customtkinter/windows/ctk_tooltip.py +++ b/customtkinter/windows/ctk_tooltip.py @@ -17,9 +17,9 @@ class CTkTooltip(CTkToplevel): **kwargs): self.wait_time = delay # milliseconds until tooltip appears self.wrap_length = wrap_length # wrap length of the tooltip text - self.master = master - self.text = text - self.mouse_offset = mouse_offset + self.master = master # parent widget + self.text = text # text to display + self.mouse_offset = mouse_offset # offset from mouse position (x, y) self.master.bind("", self._schedule, add="+") self.master.bind("", self._leave, add="+") self.master.bind("", self._leave, add="+") @@ -86,6 +86,7 @@ class CTkTooltip(CTkToplevel): self.withdraw() def configure(self, **kwargs): + # Change attributes of the tooltip, and redraw if necessary require_redraw = False if "fg_color" in kwargs: self.fg_color = kwargs["fg_color"]