From 90f7c1efb81dd954d92abd657128701b6ae9c672 Mon Sep 17 00:00:00 2001 From: "DHR.Mike" Date: Sat, 13 Dec 2025 17:21:34 -0800 Subject: [PATCH] Update Uptated-Prototype/PiperTTS-GUI-Test.py --- Uptated-Prototype/PiperTTS-GUI-Test.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Uptated-Prototype/PiperTTS-GUI-Test.py b/Uptated-Prototype/PiperTTS-GUI-Test.py index 58cd8b9..bbea501 100644 --- a/Uptated-Prototype/PiperTTS-GUI-Test.py +++ b/Uptated-Prototype/PiperTTS-GUI-Test.py @@ -71,8 +71,10 @@ except Exception as e: print("An exception occurred - when creating Controls Frame.") # Attempts to Place Input and Controls frames try: - Input_Box_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 0.7) - Controls_Box_Frame.place(x = 0, rely = 0.8, relwidth = 1, relheight = 0.7) + #Input_Box_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 0.7) + #Controls_Box_Frame.place(x = 0, rely = 0.8, relwidth = 1, relheight = 0.7) + Input_Box_Frame.pack(fill = "both", expand = True) + Controls_Box_Frame.pack(fill = "both") except Exception as e: print(e, type(e)) print("An exception occurred - when placing Frames.") @@ -80,7 +82,8 @@ except Exception as e: # Attempts to create a Input box try: Input_Box = Text(Input_Box_Frame, selectbackground="yellow", selectforeground="black", undo=True) - Input_Box.pack(padx=5, pady=5, expand = True, fill = "both") + #Input_Box.pack(padx=5, pady=5, expand = True, fill = "both") + Input_Box.pack(side = LEFT, padx=5, pady=5, expand = True, fill = "both") except Exception as e: print(e, type(e)) print("An exception occurred - when creating input box.") @@ -89,7 +92,9 @@ except Exception as e: try: Main_Text_Scrollbar = ttk.Scrollbar(Input_Box_Frame, orient = "vertical", command = Input_Box.yview) Input_Box.configure(yscrollcommand = Main_Text_Scrollbar.set) - Main_Text_Scrollbar.place(relx = 1, rely = 0, relheight = 1, anchor = "ne") + #Main_Text_Scrollbar.place(relx = 1, rely = 0, relheight = 1, anchor = "ne") + Main_Text_Scrollbar.pack(side = RIGHT, fill = "y") + except Exception as e: print(e, type(e)) print("An exception occurred - when creating a scroll bar.") @@ -229,9 +234,15 @@ def PiperTTS_GUI_Randomize_Text_2nd(): # def PiperTTS_GUI_Set_Prefrences(): try: - Input_Box_Frame.place_forget() - Controls_Box_Frame.place_forget() - Prefrences_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 1) + if Prefrences_Frame; + Input_Box_Frame.pack(fill = "both", expand = True) + Controls_Box_Frame.pack(fill = "both") + else: + #Input_Box_Frame.place_forget() + #Controls_Box_Frame.place_forget() + Input_Box_Frame.pack_forget() + Controls_Box_Frame.pack_forget() + Prefrences_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 1) except Exception as e: print(e, type(e)) print("An exception occurred - when Setting prefrences.")