[modify] textbox color, nagative value

This commit is contained in:
2024-05-31 18:33:36 +08:00
parent 14c72fe080
commit cc1463b166
2 changed files with 3 additions and 1 deletions

View File

@@ -215,6 +215,7 @@ class App(customtkinter.CTk):
def write2textbox(self, text, wait=0, exitcode=0):
if wait != 0:
self.textbox.configure(text_color='blue')
self.textbox.insert(index='end', text=text)
self.textbox.update()
self.textbox.see('end')
@@ -225,6 +226,7 @@ class App(customtkinter.CTk):
self.textbox.see('end')
raise Exception(f"Error code: {exitcode}")
else:
self.textbox.configure(text_color='blue')
self.textbox.insert(index='end', text=text + '\n')
self.textbox.update()
self.textbox.see('end')