Update Uptated-Prototype/PiperTTS-GUI-Test.py
This commit is contained in:
@@ -16,6 +16,7 @@ Window_PosX = (Screen_Width/2) - (Window_Width/2)
|
|||||||
Window_PosY = (Screen_Height/2) - (Window_Height/2)
|
Window_PosY = (Screen_Height/2) - (Window_Height/2)
|
||||||
# Setting up Window in Center
|
# Setting up Window in Center
|
||||||
Root_Window.geometry(f'{Window_Width}x{Window_Height}+{int(Window_PosX)}+{int(Window_PosY)}') # Sets the GUI geometry
|
Root_Window.geometry(f'{Window_Width}x{Window_Height}+{int(Window_PosX)}+{int(Window_PosY)}') # Sets the GUI geometry
|
||||||
|
#Root_Window.minsize(Window_Width, Window_Height)
|
||||||
|
|
||||||
# Attempts to make a Input box
|
# Attempts to make a Input box
|
||||||
try:
|
try:
|
||||||
@@ -26,31 +27,33 @@ except:
|
|||||||
try:
|
try:
|
||||||
Controls_Box_Frame = Frame(Root_Window)
|
Controls_Box_Frame = Frame(Root_Window)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when creating Controls Frame.")
|
print("An exception occurred - when creating Controls Frame.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
Input_Box_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 0.8)
|
Input_Box_Frame.place(x = 0, y = 0, relwidth = 1, relheight = 0.8)
|
||||||
Controls_Box_Frame.place(x = 0, rely = 0.8, relwidth = 1, relheight = 0.8)
|
Controls_Box_Frame.place(x = 0, rely = 0.8, relwidth = 1, relheight = 0.8)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when placing Frames.")
|
print("An exception occurred - when placing Frames.")
|
||||||
|
|
||||||
#Input_Box_Frame.grid(row=0, column=0, columnspan=5, padx=10, pady=20, sticky="NSEW")
|
|
||||||
|
|
||||||
#Main_Text_Scrollbar = Scrollbar(Input_Box_Frame)
|
|
||||||
#Main_Text_Scrollbar.pack(side=RIGHT, fill=y)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
Input_Box = Text(Input_Box_Frame, Yscrollcommand=Main_Text_Scrollbar.set)
|
Input_Box = Text(Input_Box_Frame)
|
||||||
Input_Box.pack(padx=20, pady=20)
|
Input_Box.pack(padx=20, pady=20, expand = True, fill = "both")
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when creating input box.")
|
print("An exception occurred - when creating input box.")
|
||||||
|
|
||||||
|
try:
|
||||||
|
Main_Text_Scrollbar = Scrollbar(Input_Box_Frame, command = Input_Box_Frame.yview)
|
||||||
|
Input_Box_Frame.configure(yscrollcommand = Main_Text_Scrollbar.set)
|
||||||
|
Main_Text_Scrollbar.place(relx = 1, rely = 0, relheight = 1 anchor = "ne")
|
||||||
|
except:
|
||||||
|
print("An exception occurred - when creating a scroll bar.")
|
||||||
|
|
||||||
#
|
#
|
||||||
def PiperTTS_GUI_Play():
|
def PiperTTS_GUI_Play():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Playing?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Playing?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
C_Button_Pause["state"] == "normal"
|
C_Button_Pause["state"] == "normal"
|
||||||
C_Button_Pause["state"] = "disabled"
|
C_Button_Pause["state"] = "disabled"
|
||||||
@@ -60,9 +63,9 @@ def PiperTTS_GUI_Play():
|
|||||||
#
|
#
|
||||||
def PiperTTS_GUI_Pause():
|
def PiperTTS_GUI_Pause():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Pause?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Pause?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
C_Button_Pause["state"] == "disabled"
|
C_Button_Pause["state"] == "disabled"
|
||||||
C_Button_Pause["state"] = "normal"
|
C_Button_Pause["state"] = "normal"
|
||||||
@@ -72,9 +75,9 @@ def PiperTTS_GUI_Pause():
|
|||||||
#
|
#
|
||||||
def PiperTTS_GUI_Stop():
|
def PiperTTS_GUI_Stop():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Stop?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Stop?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Stop Button.")
|
print("An exception occurred - when pressing Stop Button.")
|
||||||
@@ -82,9 +85,9 @@ def PiperTTS_GUI_Stop():
|
|||||||
#
|
#
|
||||||
def PiperTTS_GUI_Previous():
|
def PiperTTS_GUI_Previous():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Previous?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Previous?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Previous Button.")
|
print("An exception occurred - when pressing Previous Button.")
|
||||||
@@ -92,9 +95,9 @@ def PiperTTS_GUI_Previous():
|
|||||||
#
|
#
|
||||||
def PiperTTS_GUI_Next():
|
def PiperTTS_GUI_Next():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Next?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Next?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Next Button.")
|
print("An exception occurred - when pressing Next Button.")
|
||||||
@@ -102,9 +105,9 @@ def PiperTTS_GUI_Next():
|
|||||||
#
|
#
|
||||||
def PiperTTS_GUI_Clipboard():
|
def PiperTTS_GUI_Clipboard():
|
||||||
try:
|
try:
|
||||||
PiperTTS_GUI_Hide_All_Labels()
|
#PiperTTS_GUI_Hide_All_Labels()
|
||||||
My_Label = Label(Controls_Box_Frame, text="Clipboard?").grid(row=3, column=0, columnspan=5)
|
My_Label = Label(Controls_Box_Frame, text="Clipboard?").grid(row=3, column=0, columnspan=5)
|
||||||
global labels = []
|
#global labels = []
|
||||||
labels.append(My_Label)
|
labels.append(My_Label)
|
||||||
except:
|
except:
|
||||||
print("An exception occurred - when pressing Clipboard Button.")
|
print("An exception occurred - when pressing Clipboard Button.")
|
||||||
|
|||||||
Reference in New Issue
Block a user