Python 3 Tkinter output in different GUI frames
up vote
-1
down vote
favorite
I have the following code for an exercise which is to calculate speeding fine based on inputs put into the graphical box, then display the two outputs in two different GUI frames. This is my 1st experience with python and I am self-teaching.
I am wondering the best way to accomplish this with what I already have. I doubt what I have written is best practice but I am trying to get the concepts down. If I separate it into frames and stack them as shown in Switch between two frames in tkinter
That might work, but I didn't think that fit the exercise requirements. Apologize for my amateurish knowledge, could someone point me in the right direction?
import tkinter as tk
master = tk.Tk()
v= tk.IntVar()
tk.Label(master, text="Speed Limit of Zone").grid(row=0)
tk.Label(master, text="Speed of Vehicle").grid(row=1)
e1 = tk.Entry(master)
e2 = tk.Entry(master)
e1.insert(10,"45")
e2.insert(10,"66")
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
tk.Label(master, text="Whether Construction or School Zone").grid(row=2)
e3 = tk.Radiobutton(master,
text = "Y",
padx = 20,
variable =v,
value=1)
e3.grid(row=2, column=1)
e4=tk.Radiobutton(master,
text = "N",
padx = 20,
variable =v,
value=0)
e4.grid(row=2,column=2)
e5= tk.Button(master,
text="Submit",
width=25,
command=master.destroy)
e5.grid(row=3,column=3)
a=e1.get()
b=e2.get()
c = int(b) - int(a)
print('Speed Limit: ')
print(a)
print("Vehicle Speed: ")
print(b)
print('Construction or School Zone: NO')
if( c < 10):
print('Total Fine Calculated:$129.00')
print('Display: Be Careful')
elif(c>=10 and c<15):
print('Total Fine Calculated:$204.00')
print('Display:Drive with Caution')
elif(c>=15 and c<20):
print('Total Fine Calculated:$254.00')
print('Display:You are Driving Dangerous')
elif(c>=20 and c<30):
print('Total Fine Calculated:$279.00')
print('Display:You are in Danger zone')
else:
print('See ya in Court')
print('Display:Court Mandatory')
master.mainloop()
Edit:
Here is my second attempt
import tkinter as tk
import tkinter.messagebox
class MyGUI:
def __init__(self):
#creates main window
self.main_window = tk.Tk()
self.top_frame = tk.Frame(self.main_window)
self.bottom_frame = tk.Frame(self.main_window)
self.limit_label = tk.Label(self.top_frame,
text = "Enter Speed Limit")
self.limit_entry = tk.Entry(self.top_frame,
width = 10)
self.speed_label = tk.Label(self.top_frame,
text = "Enter Speed of Vehicle")
self.speed_entry = tk.Entry(self.top_frame,
width = 10)
self.whether_label = tk.Label(self.top_frame,
text="Whether Construction or School Zone?")
self.whether_entry = tk.Entry(self.top_frame,
width = 10)
self.limit_label.pack(side="left")
self.limit_entry.pack(side="left")
self.speed_label.pack(side="left")
self.speed_entry.pack(side="left")
self.whether_label.pack(side="left")
self.whether_entry.pack(side="left")
self.calc_button = tk.Button(self.bottom_frame,
text="Submit",
command = self.calculate)
self.quit_button = tk.Button(self.bottom_frame,
text="Quit",
command = self.main_window.destroy)
self.calc_button.pack(side="left")
self.quit_button.pack(side="left")
self.top_frame.pack()
self.bottom_frame.pack()
tk.mainloop()
def calculate(self):
#method to calculate fines
speedLimit = float(self.limit_entry.get())
vehicleSpeed = float(self.speed_entry.get())
doubleFine = str(self.whether_entry.get())
speedingFine = 0
if speedLimit >= vehicleSpeed:
speedingFine = 0.00;
if vehicleSpeed > speedLimit:
if vehicleSpeed <= speedLimit + 9:
speedingFine = 129.00;
elif vehicleSpeed <= speedLimit + 14:
speedingFine = 204.00;
elif vehicleSpeed <= speedLimit + 19:
speedingFine = 254.00;
elif vehicleSpeed <= speedLimit + 29:
speedingFine = 279.00;
elif vehicleSpeed >= speedLimit + 30:
speedingFine = "Court Mandatory";
if speedLimit >= vehicleSpeed:
programMessage = "You are a safe driver!"
elif vehicleSpeed <= speedLimit + 9:
programMessage = "Be Careful"
elif vehicleSpeed <= speedLimit + 14:
programMessage = "Drive with caution"
elif vehicleSpeed <= speedLimit + 19:
programMessage = "You are driving dangerous"
elif vehicleSpeed <= speedLimit + 29:
programMessage = "You are in Danger zone"
elif vehicleSpeed >= speedLimit + 30:
programMessage = "See ya in court"
if doubleFine == "Yes" or "yes" or "y" :
speedingFine = speedingFine * 2
tk.messagebox.showinfo("Results",
" Speed Limit: " + str(speedLimit) +
" Vehicle Speed: " + str(vehicleSpeed) +
" Construction or School Zone: " + str(doubleFine) +
" Total Fine: " + str(speedingFine) +
" Display: " + str(programMessage))
my_gui = MyGUI()
python tkinter
add a comment |
up vote
-1
down vote
favorite
I have the following code for an exercise which is to calculate speeding fine based on inputs put into the graphical box, then display the two outputs in two different GUI frames. This is my 1st experience with python and I am self-teaching.
I am wondering the best way to accomplish this with what I already have. I doubt what I have written is best practice but I am trying to get the concepts down. If I separate it into frames and stack them as shown in Switch between two frames in tkinter
That might work, but I didn't think that fit the exercise requirements. Apologize for my amateurish knowledge, could someone point me in the right direction?
import tkinter as tk
master = tk.Tk()
v= tk.IntVar()
tk.Label(master, text="Speed Limit of Zone").grid(row=0)
tk.Label(master, text="Speed of Vehicle").grid(row=1)
e1 = tk.Entry(master)
e2 = tk.Entry(master)
e1.insert(10,"45")
e2.insert(10,"66")
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
tk.Label(master, text="Whether Construction or School Zone").grid(row=2)
e3 = tk.Radiobutton(master,
text = "Y",
padx = 20,
variable =v,
value=1)
e3.grid(row=2, column=1)
e4=tk.Radiobutton(master,
text = "N",
padx = 20,
variable =v,
value=0)
e4.grid(row=2,column=2)
e5= tk.Button(master,
text="Submit",
width=25,
command=master.destroy)
e5.grid(row=3,column=3)
a=e1.get()
b=e2.get()
c = int(b) - int(a)
print('Speed Limit: ')
print(a)
print("Vehicle Speed: ")
print(b)
print('Construction or School Zone: NO')
if( c < 10):
print('Total Fine Calculated:$129.00')
print('Display: Be Careful')
elif(c>=10 and c<15):
print('Total Fine Calculated:$204.00')
print('Display:Drive with Caution')
elif(c>=15 and c<20):
print('Total Fine Calculated:$254.00')
print('Display:You are Driving Dangerous')
elif(c>=20 and c<30):
print('Total Fine Calculated:$279.00')
print('Display:You are in Danger zone')
else:
print('See ya in Court')
print('Display:Court Mandatory')
master.mainloop()
Edit:
Here is my second attempt
import tkinter as tk
import tkinter.messagebox
class MyGUI:
def __init__(self):
#creates main window
self.main_window = tk.Tk()
self.top_frame = tk.Frame(self.main_window)
self.bottom_frame = tk.Frame(self.main_window)
self.limit_label = tk.Label(self.top_frame,
text = "Enter Speed Limit")
self.limit_entry = tk.Entry(self.top_frame,
width = 10)
self.speed_label = tk.Label(self.top_frame,
text = "Enter Speed of Vehicle")
self.speed_entry = tk.Entry(self.top_frame,
width = 10)
self.whether_label = tk.Label(self.top_frame,
text="Whether Construction or School Zone?")
self.whether_entry = tk.Entry(self.top_frame,
width = 10)
self.limit_label.pack(side="left")
self.limit_entry.pack(side="left")
self.speed_label.pack(side="left")
self.speed_entry.pack(side="left")
self.whether_label.pack(side="left")
self.whether_entry.pack(side="left")
self.calc_button = tk.Button(self.bottom_frame,
text="Submit",
command = self.calculate)
self.quit_button = tk.Button(self.bottom_frame,
text="Quit",
command = self.main_window.destroy)
self.calc_button.pack(side="left")
self.quit_button.pack(side="left")
self.top_frame.pack()
self.bottom_frame.pack()
tk.mainloop()
def calculate(self):
#method to calculate fines
speedLimit = float(self.limit_entry.get())
vehicleSpeed = float(self.speed_entry.get())
doubleFine = str(self.whether_entry.get())
speedingFine = 0
if speedLimit >= vehicleSpeed:
speedingFine = 0.00;
if vehicleSpeed > speedLimit:
if vehicleSpeed <= speedLimit + 9:
speedingFine = 129.00;
elif vehicleSpeed <= speedLimit + 14:
speedingFine = 204.00;
elif vehicleSpeed <= speedLimit + 19:
speedingFine = 254.00;
elif vehicleSpeed <= speedLimit + 29:
speedingFine = 279.00;
elif vehicleSpeed >= speedLimit + 30:
speedingFine = "Court Mandatory";
if speedLimit >= vehicleSpeed:
programMessage = "You are a safe driver!"
elif vehicleSpeed <= speedLimit + 9:
programMessage = "Be Careful"
elif vehicleSpeed <= speedLimit + 14:
programMessage = "Drive with caution"
elif vehicleSpeed <= speedLimit + 19:
programMessage = "You are driving dangerous"
elif vehicleSpeed <= speedLimit + 29:
programMessage = "You are in Danger zone"
elif vehicleSpeed >= speedLimit + 30:
programMessage = "See ya in court"
if doubleFine == "Yes" or "yes" or "y" :
speedingFine = speedingFine * 2
tk.messagebox.showinfo("Results",
" Speed Limit: " + str(speedLimit) +
" Vehicle Speed: " + str(vehicleSpeed) +
" Construction or School Zone: " + str(doubleFine) +
" Total Fine: " + str(speedingFine) +
" Display: " + str(programMessage))
my_gui = MyGUI()
python tkinter
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I have the following code for an exercise which is to calculate speeding fine based on inputs put into the graphical box, then display the two outputs in two different GUI frames. This is my 1st experience with python and I am self-teaching.
I am wondering the best way to accomplish this with what I already have. I doubt what I have written is best practice but I am trying to get the concepts down. If I separate it into frames and stack them as shown in Switch between two frames in tkinter
That might work, but I didn't think that fit the exercise requirements. Apologize for my amateurish knowledge, could someone point me in the right direction?
import tkinter as tk
master = tk.Tk()
v= tk.IntVar()
tk.Label(master, text="Speed Limit of Zone").grid(row=0)
tk.Label(master, text="Speed of Vehicle").grid(row=1)
e1 = tk.Entry(master)
e2 = tk.Entry(master)
e1.insert(10,"45")
e2.insert(10,"66")
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
tk.Label(master, text="Whether Construction or School Zone").grid(row=2)
e3 = tk.Radiobutton(master,
text = "Y",
padx = 20,
variable =v,
value=1)
e3.grid(row=2, column=1)
e4=tk.Radiobutton(master,
text = "N",
padx = 20,
variable =v,
value=0)
e4.grid(row=2,column=2)
e5= tk.Button(master,
text="Submit",
width=25,
command=master.destroy)
e5.grid(row=3,column=3)
a=e1.get()
b=e2.get()
c = int(b) - int(a)
print('Speed Limit: ')
print(a)
print("Vehicle Speed: ")
print(b)
print('Construction or School Zone: NO')
if( c < 10):
print('Total Fine Calculated:$129.00')
print('Display: Be Careful')
elif(c>=10 and c<15):
print('Total Fine Calculated:$204.00')
print('Display:Drive with Caution')
elif(c>=15 and c<20):
print('Total Fine Calculated:$254.00')
print('Display:You are Driving Dangerous')
elif(c>=20 and c<30):
print('Total Fine Calculated:$279.00')
print('Display:You are in Danger zone')
else:
print('See ya in Court')
print('Display:Court Mandatory')
master.mainloop()
Edit:
Here is my second attempt
import tkinter as tk
import tkinter.messagebox
class MyGUI:
def __init__(self):
#creates main window
self.main_window = tk.Tk()
self.top_frame = tk.Frame(self.main_window)
self.bottom_frame = tk.Frame(self.main_window)
self.limit_label = tk.Label(self.top_frame,
text = "Enter Speed Limit")
self.limit_entry = tk.Entry(self.top_frame,
width = 10)
self.speed_label = tk.Label(self.top_frame,
text = "Enter Speed of Vehicle")
self.speed_entry = tk.Entry(self.top_frame,
width = 10)
self.whether_label = tk.Label(self.top_frame,
text="Whether Construction or School Zone?")
self.whether_entry = tk.Entry(self.top_frame,
width = 10)
self.limit_label.pack(side="left")
self.limit_entry.pack(side="left")
self.speed_label.pack(side="left")
self.speed_entry.pack(side="left")
self.whether_label.pack(side="left")
self.whether_entry.pack(side="left")
self.calc_button = tk.Button(self.bottom_frame,
text="Submit",
command = self.calculate)
self.quit_button = tk.Button(self.bottom_frame,
text="Quit",
command = self.main_window.destroy)
self.calc_button.pack(side="left")
self.quit_button.pack(side="left")
self.top_frame.pack()
self.bottom_frame.pack()
tk.mainloop()
def calculate(self):
#method to calculate fines
speedLimit = float(self.limit_entry.get())
vehicleSpeed = float(self.speed_entry.get())
doubleFine = str(self.whether_entry.get())
speedingFine = 0
if speedLimit >= vehicleSpeed:
speedingFine = 0.00;
if vehicleSpeed > speedLimit:
if vehicleSpeed <= speedLimit + 9:
speedingFine = 129.00;
elif vehicleSpeed <= speedLimit + 14:
speedingFine = 204.00;
elif vehicleSpeed <= speedLimit + 19:
speedingFine = 254.00;
elif vehicleSpeed <= speedLimit + 29:
speedingFine = 279.00;
elif vehicleSpeed >= speedLimit + 30:
speedingFine = "Court Mandatory";
if speedLimit >= vehicleSpeed:
programMessage = "You are a safe driver!"
elif vehicleSpeed <= speedLimit + 9:
programMessage = "Be Careful"
elif vehicleSpeed <= speedLimit + 14:
programMessage = "Drive with caution"
elif vehicleSpeed <= speedLimit + 19:
programMessage = "You are driving dangerous"
elif vehicleSpeed <= speedLimit + 29:
programMessage = "You are in Danger zone"
elif vehicleSpeed >= speedLimit + 30:
programMessage = "See ya in court"
if doubleFine == "Yes" or "yes" or "y" :
speedingFine = speedingFine * 2
tk.messagebox.showinfo("Results",
" Speed Limit: " + str(speedLimit) +
" Vehicle Speed: " + str(vehicleSpeed) +
" Construction or School Zone: " + str(doubleFine) +
" Total Fine: " + str(speedingFine) +
" Display: " + str(programMessage))
my_gui = MyGUI()
python tkinter
I have the following code for an exercise which is to calculate speeding fine based on inputs put into the graphical box, then display the two outputs in two different GUI frames. This is my 1st experience with python and I am self-teaching.
I am wondering the best way to accomplish this with what I already have. I doubt what I have written is best practice but I am trying to get the concepts down. If I separate it into frames and stack them as shown in Switch between two frames in tkinter
That might work, but I didn't think that fit the exercise requirements. Apologize for my amateurish knowledge, could someone point me in the right direction?
import tkinter as tk
master = tk.Tk()
v= tk.IntVar()
tk.Label(master, text="Speed Limit of Zone").grid(row=0)
tk.Label(master, text="Speed of Vehicle").grid(row=1)
e1 = tk.Entry(master)
e2 = tk.Entry(master)
e1.insert(10,"45")
e2.insert(10,"66")
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
tk.Label(master, text="Whether Construction or School Zone").grid(row=2)
e3 = tk.Radiobutton(master,
text = "Y",
padx = 20,
variable =v,
value=1)
e3.grid(row=2, column=1)
e4=tk.Radiobutton(master,
text = "N",
padx = 20,
variable =v,
value=0)
e4.grid(row=2,column=2)
e5= tk.Button(master,
text="Submit",
width=25,
command=master.destroy)
e5.grid(row=3,column=3)
a=e1.get()
b=e2.get()
c = int(b) - int(a)
print('Speed Limit: ')
print(a)
print("Vehicle Speed: ")
print(b)
print('Construction or School Zone: NO')
if( c < 10):
print('Total Fine Calculated:$129.00')
print('Display: Be Careful')
elif(c>=10 and c<15):
print('Total Fine Calculated:$204.00')
print('Display:Drive with Caution')
elif(c>=15 and c<20):
print('Total Fine Calculated:$254.00')
print('Display:You are Driving Dangerous')
elif(c>=20 and c<30):
print('Total Fine Calculated:$279.00')
print('Display:You are in Danger zone')
else:
print('See ya in Court')
print('Display:Court Mandatory')
master.mainloop()
Edit:
Here is my second attempt
import tkinter as tk
import tkinter.messagebox
class MyGUI:
def __init__(self):
#creates main window
self.main_window = tk.Tk()
self.top_frame = tk.Frame(self.main_window)
self.bottom_frame = tk.Frame(self.main_window)
self.limit_label = tk.Label(self.top_frame,
text = "Enter Speed Limit")
self.limit_entry = tk.Entry(self.top_frame,
width = 10)
self.speed_label = tk.Label(self.top_frame,
text = "Enter Speed of Vehicle")
self.speed_entry = tk.Entry(self.top_frame,
width = 10)
self.whether_label = tk.Label(self.top_frame,
text="Whether Construction or School Zone?")
self.whether_entry = tk.Entry(self.top_frame,
width = 10)
self.limit_label.pack(side="left")
self.limit_entry.pack(side="left")
self.speed_label.pack(side="left")
self.speed_entry.pack(side="left")
self.whether_label.pack(side="left")
self.whether_entry.pack(side="left")
self.calc_button = tk.Button(self.bottom_frame,
text="Submit",
command = self.calculate)
self.quit_button = tk.Button(self.bottom_frame,
text="Quit",
command = self.main_window.destroy)
self.calc_button.pack(side="left")
self.quit_button.pack(side="left")
self.top_frame.pack()
self.bottom_frame.pack()
tk.mainloop()
def calculate(self):
#method to calculate fines
speedLimit = float(self.limit_entry.get())
vehicleSpeed = float(self.speed_entry.get())
doubleFine = str(self.whether_entry.get())
speedingFine = 0
if speedLimit >= vehicleSpeed:
speedingFine = 0.00;
if vehicleSpeed > speedLimit:
if vehicleSpeed <= speedLimit + 9:
speedingFine = 129.00;
elif vehicleSpeed <= speedLimit + 14:
speedingFine = 204.00;
elif vehicleSpeed <= speedLimit + 19:
speedingFine = 254.00;
elif vehicleSpeed <= speedLimit + 29:
speedingFine = 279.00;
elif vehicleSpeed >= speedLimit + 30:
speedingFine = "Court Mandatory";
if speedLimit >= vehicleSpeed:
programMessage = "You are a safe driver!"
elif vehicleSpeed <= speedLimit + 9:
programMessage = "Be Careful"
elif vehicleSpeed <= speedLimit + 14:
programMessage = "Drive with caution"
elif vehicleSpeed <= speedLimit + 19:
programMessage = "You are driving dangerous"
elif vehicleSpeed <= speedLimit + 29:
programMessage = "You are in Danger zone"
elif vehicleSpeed >= speedLimit + 30:
programMessage = "See ya in court"
if doubleFine == "Yes" or "yes" or "y" :
speedingFine = speedingFine * 2
tk.messagebox.showinfo("Results",
" Speed Limit: " + str(speedLimit) +
" Vehicle Speed: " + str(vehicleSpeed) +
" Construction or School Zone: " + str(doubleFine) +
" Total Fine: " + str(speedingFine) +
" Display: " + str(programMessage))
my_gui = MyGUI()
python tkinter
python tkinter
edited Nov 22 at 4:46
asked Nov 21 at 23:35
gt941
12
12
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago
add a comment |
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421938%2fpython-3-tkinter-output-in-different-gui-frames%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Update: I am trying to update with some code that worked for my purposes, although I am sure there is a much more elegant method using toplevels() to get more windows and format them better.
– gt941
Nov 22 at 4:43
I fail to understand what you are trying to achieve. Do you need two separate windows displaying this? What have you tried to get to this point? Why isn't it working? What needs to happen differently? You have posted a large amount of code for what seems to be a simple issue, as stated in this article we only need to see a minimal, complete and verifiable example. Please also read this article and rephrase your question.
– Ethan Field
2 days ago