From bcb8d9c39480a1b04ef484f68e190f704a6464d4 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sun, 7 Jan 2024 07:43:08 +0900 Subject: [PATCH] =?UTF-8?q?[bugfix]=20=E3=83=AF=E3=83=BC=E3=83=89=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=81=AB=E5=8D=98=E8=AA=9E?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E5=BE=8C=E3=80=81EntryBox=E3=81=8C=E7=A9=BA?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=82=89=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=82=20idk=20why,=20but=20in=20CTkEntry?= =?UTF-8?q?=20and=20CTkTextbox,=20the=20first=20argument=20for=20the=20del?= =?UTF-8?q?ete=20function=20is=20different.=20Otherwise,=20it=20throws=20a?= =?UTF-8?q?n=20error=20and=20doesn't=20work.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/view.py b/view.py index ef8bf6c2..546ab972 100644 --- a/view.py +++ b/view.py @@ -852,8 +852,15 @@ class View(): # Widget Control # Common + + # Note: The difference between _clearEntryBox and _clearTextBox + # idk why, but in CTkEntry and CTkTextbox, the first argument for the delete function is different. Otherwise, it throws an error. @staticmethod def _clearEntryBox(entry_widget): + entry_widget.delete(0, "end") + + @staticmethod + def _clearTextBox(entry_widget): entry_widget.delete("1.0", "end") def clearErrorMessage(self): @@ -1508,7 +1515,7 @@ class View(): return vrct_gui.entry_message_box.get('1.0', "end-1c") def clearMessageBox(self): - self._clearEntryBox(vrct_gui.entry_message_box) + self._clearTextBox(vrct_gui.entry_message_box)