Update Uptated-Prototype/PiperTTS-GUI-Test.py

This commit is contained in:
2025-12-13 17:21:34 -08:00
parent 429ad4018f
commit 90f7c1efb8

View File

@@ -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,8 +234,14 @@ def PiperTTS_GUI_Randomize_Text_2nd():
#
def PiperTTS_GUI_Set_Prefrences():
try:
Input_Box_Frame.place_forget()
Controls_Box_Frame.place_forget()
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))