From 5e620d5ec60b2f6c358c6475b05a2caca6a6dc3a Mon Sep 17 00:00:00 2001 From: "DHR.Mike" Date: Wed, 26 Nov 2025 08:45:12 -0800 Subject: [PATCH] Update Uptated-Prototype/PiperTTS-GUI-Test.py --- Uptated-Prototype/PiperTTS-GUI-Test.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Uptated-Prototype/PiperTTS-GUI-Test.py b/Uptated-Prototype/PiperTTS-GUI-Test.py index 27b8294..9c570a8 100644 --- a/Uptated-Prototype/PiperTTS-GUI-Test.py +++ b/Uptated-Prototype/PiperTTS-GUI-Test.py @@ -36,7 +36,8 @@ except: def PiperTTS_GUI_Play(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Playing?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Playing?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) C_Button_Pause["state"] == "normal" C_Button_Pause["state"] = "disabled" except: @@ -47,7 +48,8 @@ def PiperTTS_GUI_Play(): def PiperTTS_GUI_Pause(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Pause?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Pause?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) C_Button_Pause["state"] == "disabled" C_Button_Pause["state"] = "normal" except: @@ -58,7 +60,8 @@ def PiperTTS_GUI_Pause(): def PiperTTS_GUI_Stop(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Stop?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Stop?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) except: print("An exception occurred - when pressing Stop Button.") @@ -67,7 +70,8 @@ def PiperTTS_GUI_Stop(): def PiperTTS_GUI_Previous(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Previous?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Previous?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) except: print("An exception occurred - when pressing Previous Button.") @@ -76,7 +80,8 @@ def PiperTTS_GUI_Previous(): def PiperTTS_GUI_Next(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Next?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Next?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) except: print("An exception occurred - when pressing Next Button.") @@ -85,7 +90,8 @@ def PiperTTS_GUI_Next(): def PiperTTS_GUI_Clipboard(): try: PiperTTS_GUI_Hide_All_Labels() - My_Label = Label(Custom_Message, text="Clipboard?").grid(row=3, column=0, columnspan=5) + My_Label = Label(Root_Window, text="Clipboard?").grid(row=3, column=0, columnspan=5) + labels.append(My_Label) except: print("An exception occurred - when pressing Clipboard Button.") @@ -93,8 +99,8 @@ def PiperTTS_GUI_Clipboard(): # Deleting info messages def PiperTTS_GUI_Hide_All_Labels(): try: - for widget in Custom_Message.winfo_children(): - widget.destroy() + for label in labels: + label.destroy() except: print("An exception occurred - when attempting to hide previous messages.")