diff --git a/boxes/CTkMessageBox.py b/boxes/CTkMessageBox.py index c33f999..2e49b2e 100644 --- a/boxes/CTkMessageBox.py +++ b/boxes/CTkMessageBox.py @@ -85,6 +85,8 @@ class CTkMessageBox(ctk.CTkToplevel): _x += 20 # Add 20 pixels for padding on the left and right _x += 10 # Add 10 pixels for padding on the left and right + _x = max(_x, (len(self.header_map[mode]) * 16) + 25 + 20) # Set width to the length of the title if it's longer than the message + self._text = "\n".join(_text_slt) _y = 0