How to update a variable on keypress with tkinter? - python

I am trying to modify some code to work for me.
I have a running application with tkinter and I can update both scores (blue and red) when I am pressing the buttons, but I want to find a way how to do this via keypress ? For example to increase the score for the reds when pressing "r" and increase the score for the blue when pressing "b"
Tried different things from google but without any luck.
Could someone have a look and give me some hints?
import tkinter as tk
from time import sleep
window = tk.Tk()
window.configure(bg='black')
window.geometry('1024x600')
window.overrideredirect(True)
WHITE = (255, 255, 255)
BLUE = (0, 0, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLACK = (0, 0, 0)
scoreRed = 0
scoreBlue = 0
global BlueWonBoolean
global RedWonBoolean
BlueWonBoolean = False
RedWonBoolean = False
RedText = tk.StringVar()
BlueText = tk.StringVar()
RedText.set(str(scoreRed))
BlueText.set(str(scoreBlue))
def addBlue():
global scoreBlue
scoreBlue += 1
BlueText.set(str(scoreBlue))
if scoreBlue == 21:
global BlueWonBoolean
BlueWonBoolean = True
print("\nBlue Won!!!\nBLUE | RED\n " + str(scoreBlue) + " : " + str(scoreRed))
global BlueWon
BlueWon = tk.Label(text="Blue Won!!!",
foreground="white",
background="black",
width=10,
height=10)
BlueWon.pack(side=tk.TOP, fill=tk.X)
def addRed():
global scoreRed
scoreRed += 1
RedText.set(str(scoreRed))
if scoreRed == 21:
global RedWonBoolean
RedWonBoolean = True
print("\nRed Won!!!\nRED | BLUE\n" + str(scoreRed) + " : " + str(scoreBlue))
global RedWon
RedWon = tk.Label(text="Red Won!!!",
foreground="white",
background="black",
width=10,
height=10)
RedWon.pack(side=tk.TOP, fill=tk.X)
def resetScore():
global scoreRed
global scoreBlue
global BlueWonBoolean
global RedWonBoolean
scoreRed = 0
scoreBlue = 0
RedText.set(str(scoreRed))
BlueText.set(str(scoreBlue))
BlueLabel.pack(side=tk.LEFT, fill=tk.X)
RedLabel.pack(side=tk.RIGHT, fill=tk.X)
if BlueWonBoolean == True:
BlueWon.destroy()
BlueWonBoolean = False
elif RedWonBoolean == True:
RedWon.destroy()
RedWonBoolean = False
BlueButton = tk.Button(window, text="Blue Point", bg="white", fg="yellow", width=30, height=15, command=addBlue)
RedButton = tk.Button(window, text="Red Point", bg="red", fg="black", width=30, height=15, command=addRed)
ResetButton = tk.Button(window, text="Reset", width=10, height=3, command=resetScore)
BlueLabel.pack(side=tk.LEFT, fill=tk.X)
RedLabel.pack(side=tk.RIGHT, fill=tk.X)
def Quit():
exit()
while True:
try:
BlueLabel = tk.Label(
textvariable=BlueText,
foreground="white",
background="black",
width=10,
height=5
)
RedLabel = tk.Label(
textvariable=RedText,
foreground="white",
background="black",
width=10,
height=5
)
BlueButton = tk.Button(window, text="Blue Point", bg="black", fg="WHITE", width=30, height=15, command=addBlue)
RedButton = tk.Button(window, text="Red Point", bg="black", fg="WHITE", width=30, height=15, command=addRed)
ResetButton = tk.Button(window, text="Reset", bg="black", fg="WHITE", width=10, height=3, command=resetScore)
quitButton = tk.Button(window, text="Quit ", bg="black", fg="WHITE", command=Quit)
# image = tk.PhotoImage(file="cornHole.png")
# imageLabel = tk.Label(image=image)
BlueLabel.pack(side=tk.LEFT, fill=tk.X)
RedLabel.pack(side=tk.RIGHT, fill=tk.X)
BlueButton.pack(side=tk.LEFT, fill=tk.X)
RedButton.pack(side=tk.RIGHT, fill=tk.X)
# imageLabel.pack(side=tk.TOP, fill=tk.X)
quitButton.pack(side=tk.TOP, fill=tk.X)
ResetButton.pack(side=tk.TOP, fill=tk.X)
window.bind("<Escape>", exit)
window.mainloop()
except:
exit()

You can use keybindings to run the function when a key is pressed
window.bind("b", addblue )
Here are a website and a video explaining them further
https://effbot.org/tkinterbook/tkinter-events-and-bindings.htm
https://www.youtube.com/watch?v=GLnNPjL1U2g

Hi #Veleslav Panov and welcome to Stack Overflow! You can use the .bind()method available in tkinter t achieve this task. For example, imagine that you want to update variable on pressing the Enter or the Return key. Then use this:
def function_name(*args):
variable_name +=1
#say the updation to be done here
name_of_window.bind("<Return>", function_name)
Note: Instead of *args, you can use any variable name, the only thing needed is that there should be at least one variable

You can use us .bind() to bind any key to any function, the only requirment is that the function will have some argument, for example 'event'.
def function(event):
#Do something
window.bind("<Return>", function)
This way, every time the button (in this case Enter) is pressed, the function will be called. In your case you would bind 2 buttons, 'r' and 'b', to 2 functions to add score to each of the sides.
Here is a link with some examples:
https://www.geeksforgeeks.org/python-binding-function-in-tkinter/

Related

How to change the text inside Python Tkinter label depending on user action?

I've written a program where the UI displays a button that says "Enter Brewer Info" and once the user clicks that button, it calls the function "option1()" as a callback. The function option1() then calls brewers() function and gets user input to assign the values for num_brewer and brewer which is then returned in that function. The num_brewer and brewer var is then assigned as a global variable in option1() and global brewer_flag is set to 1.
Inside the while loop, it checks to see if brewer_flag is set to 1 and if not, it prints "Please select '1' to enter the brewer information first:". Once the user has entered the brewer info and brewer_flag is set to 1 (in option1 function), it's supposed to display "Brewers Selected: "+str(brewer)+" in the label but even after i enter brewer info and brewer_flag is set to 1, it still prints "Please select '1' to enter the brewer information first:" in the label and doesn't change the label to display the brewer array.
What exactly am i doing wrong?
(Im also aware that my while loop needs to exit by making leave = 1 but I'm doing that later)
import errno
from tkinter import *
from tkinter import messagebox
import os
import sys
import math
import numpy as np
import time
import subprocess
import socket
root = Tk()
root.title("Creator.py GUI")
root.config(bg="#17173c")
root.geometry("800x400")
global brewer_flag
#TKINTER FUNCTIONS TO REDUCE REPETITIVE CODE
def print_output(textinput, width, height):
new_window = Toplevel(root)
new_window.geometry("{}x{}".format(width, height))
new_window.title("")
new_window.config(bg="black")
label2 = Label(new_window, text=textinput, bg="black", fg="red")
label2.grid(row=0, column=0)
button10 = Button(new_window, text="Ok", width = 5, font="System 20", bg="green", fg="black", activebackground="black", activeforeground="red", borderwidth=5, cursor="hand2", highlightthickness=0, highlightcolor="black", highlightbackground="black", command=lambda: new_window.destroy())
button10.grid(row=1, column=0)
var = StringVar()
def get_input(textinput, width, height):
new_window = Toplevel(root)
new_window.geometry("{}x{}".format(width, height))
new_window.title("")
new_window.config(bg="#17173c")
label2 = Label(new_window, text=textinput)
label2.grid(row=0, column=0)
def return_value():
var.set(entry1.get())
entry1 = Entry(new_window)
entry1.grid(row=0, column=1)
button10 = Button(new_window, text="Ok", width = 10, font="System 20", bg="green", fg="black", activebackground="black", activeforeground="red", borderwidth=5, cursor="hand2", highlightthickness=0, highlightcolor="black", highlightbackground="black", command=lambda: [return_value(), new_window.destroy()])
button10.grid(row=1, column=0)
new_window.wait_variable(var)
#print(var.get())
return var.get()
def brewers():
#print("test")
flag = 1
while (flag==1):
try:
num_brewer=int(get_input("Number of brewers? (1-4): ", 400, 60))
#num_brewer=int(input("Number of brewers? (1-4): "))
#brewerInfo()
#num_brewer=int(val)
if (1 <= num_brewer <= 4):
flag=0
else:
error="Invalid input, try again"
print_output(error, 300, 100)
except ValueError:
error="Invalid input, input must be an interger"
print_output(error, 300, 100)
#brewer = [input("Enter the brewer # (ie: 024): ")]
brewer = [get_input("Enter the brewer # (ie: 024): ", 400, 60)]
for x in range (1, num_brewer):
print (brewer)
brewer.append(get_input("Enter the brewer # (ie: 024): ", 400, 60))
#brewer_flag= 1
return brewer, num_brewer
#########################################START OF PROGRAM###################################################
leave=0
brewer_flag = 0
while (leave==0):
if (brewer_flag == 1):
#make it a label on the home page
brewerselect = "Brewers Selected: "+str(brewer)+""
else:
#make it a label on the home page
brewerselect= "Please select '1' to enter the brewer information first:"
label2 = Label(root, text=brewerselect, bg="grey", fg="black")
def option1():
global brewer, num_brewer
brewer, num_brewer=brewers()
global brewer_flag
brewer_flag=1
#brewerselected="Brewers Selected: "+str(brewer)
#print(brewerselected)
button1 = Button(root, text="Enter brewer INFO", width = 40, font="System 20", bg="red", fg="black", activebackground="black", activeforeground="red", borderwidth=5, cursor="hand2", highlightthickness=0, highlightcolor="black", highlightbackground="black", command= option1)
label2.pack()
button1.pack()
# window in mainloop:
root.mainloop()
print ("Bye!")
exit(0)

how to make a checkbox and check the state of it(if its correct or no)

hello i want to make 3 checkboxes one saying cpu, one saying gpu and one saying cll
and i want to check if the answer is correct so can u show me how to do that
import time
import tkinter as tk
import pygame
window = tk.Tk()
pygame.mixer.init()
img = tk.PhotoImage(file='C:\\Users\\laithmaree\\PycharmProjects\\create_apps_with_python\\brainicon.ico.png')
window.title("Quiz Game")
# pygame.mixer.music.load('ForestWalk-320bit.wav')
# pygame.mixer.music.play()
# i created an icon
# i made a title
window.geometry("800x600")
window.resizable(width=False, height=False)
window.iconphoto(False, img)
label1 = tk.Label(window, text='Quiz App', font=("Arial Bold", 25))
label1.pack()
txtbox = tk.Entry(window, width=50)
def playbuttonclicked():
label1.destroy()
playbtn.destroy()
quitbtn.destroy()
label2 = tk.Label(window, text='What is the short form of computer science',font=("Arial Bold", 25))
label2.pack()
txtbox.place(x=250, y=200, height=40)
def chkanswer():
useranswer = txtbox.get() # Get contents from Entry
if useranswer == 'cs':
lblcorrect = tk.Label(window, text='correct', )
lblcorrect.pack()
def delete():
lblcorrect.destroy()
label2.destroy()
txtbox.destroy()
submitbtn.destroy()
label3 = tk.Label(window, text='whats is the short form of central proccessing unit', font=('Arial Bold', 25))
label3.pack()
lblcorrect.after(1001, delete)
else:
lblwrong = tk.Label(window, text='Try Again')
lblwrong.pack()
def deletefunction():
lblwrong.destroy()
lblwrong.after(1000, deletefunction)
submitbtn = tk.Button(window, text='Submit', font=('Arial Bold', 30), command=chkanswer, bg='red')
submitbtn.place(x=305, y=400)
submitbtn.bind('<Enter>', lambda e: e.widget.config(bg='grey'))
submitbtn.bind('<Leave>', lambda e: e.widget.config(bg='red'))
playbtn = tk.Button(window, text='Play', font=("Arial Bold", 90), bg='red', command=playbuttonclicked)
playbtn.place(x=10, y=200)
playbtn.bind('<Enter>', lambda e: e.widget.config(bg='grey'))
playbtn.bind('<Leave>', lambda e: e.widget.config(bg='red'))
def quitbuttonclicked():
window.destroy()
quitbtn = tk.Button(window, text='Quit', font=("Arial Bold", 90), bg='red', command=quitbuttonclicked)
quitbtn.place(x=400, y=200)
quitbtn.bind('<Enter>', lambda e: e.widget.config(bg='grey'))
quitbtn.bind('<Leave>', lambda e: e.widget.config(bg='red'))
window.mainloop()
the question is label 3 (whats is the short form of central proccessing unit) and i want to make sure the answer is correct because i am creating a quiz app thx
Here is a minimal example of how to create a Checkbutton and to attach a boolean variable and event to it:
import tkinter as tk
window = tk.Tk()
# callback for checkbutton
def checkbox_callback():
is_checked = checkbox_var.get()
print(f"The checkbox is selected: " + str(is_checked))
# variable to store the current value of the checkbutton
checkbox_var = tk.BooleanVar()
# checkbutton with text, variable and callback
checkbox = tk.Checkbutton(window, text="Click me", variable=checkbox_var, command=checkbox_callback)
checkbox.pack()
window.mainloop()

Tkinter(python) code crashing without any errors

This is the code that i was trying to execute and it works good when i click on button for 55 times but on the 56 attempt it crashes. I am not able to understand why is it so. please help why it is crashing and how to solve this. I was trying to make a tambola board using tkinter. and should i use tkinter
from tkinter import *
import random
main_var = []
done_var = []
for a in range(1, 91):
main_var.append(a)
def board():
increas = 1
for x in range(10, 495, 55):
for y in range(10, 700, 70):
frame = Frame(
master=window,
relief=RAISED,
borderwidth=2,
bg="orange"
)
frame.place(x=y, y=x)
num_label = Label(master=frame, text=increas, borderwidth=2, bg="orange", fg="white", height=3,
width=9)
num_label.pack()
increas += 1
def num_generate():
random_num = random.choice(main_var)
num.set(random_num)
print(random_num)
main_var.remove(random_num)
done_var.append(random_num)
increas = 1
for x in range(10, 495, 55):
for y in range(10, 700, 70):
if increas in done_var:
frame = Frame(
master=window,
relief=RIDGE,
borderwidth=2,
bg="green"
)
frame.place(x=y, y=x)
num_label = Label(master=frame, text=increas, borderwidth=2, bg="green", fg="white", height=3,
width=9)
num_label.pack()
increas += 1
else:
frame = Frame(
master=window,
relief=RAISED,
borderwidth=2,
bg="orange"
)
frame.place(x=y, y=x)
num_label = Label(master=frame, text=increas, borderwidth=2, bg="orange", fg="white", height=3,
width=9)
num_label.pack()
increas += 1
# initialising
window = Tk()
window.geometry("1000x1000")
window.title("Tambola Game")
# for adding values from 1 to 90
# board function
board()
# Number Generator and marking on board
num = StringVar()
num_generate = Button(text="Generate", height=3, width=70, bg="red", fg="white", command=num_generate)
num_generate.place(x=770, y=500)
Label(textvariable=num, fg="dark blue", font="Algerian 200 bold").place(x=855, y=100)
# Orange = Not done, Green = Done
user_tell = Frame(relief=GROOVE, borderwidth=2)
user_tell.place(x=10, y=550)
label = Label(user_tell, text="PENDING NUMBERS", bg="Orange", width=25, fg="black", font="Verdana")
label.pack()
label = Label(user_tell, text="CALLED NUMBERS", bg="green", width=25, fg="black", font="Verdana")
label.pack()
# offers menu
window.mainloop()
It is not crashing without an error, it is raising the following exception : Cannot choose from an empty sequence.
This means that the main_var is empty (you have removed every element from it). You should check for it before trying to remove an element :
def num_generate():
if len(main_var) > 0:
random_num = random.choice(main_var)
num.set(random_num)
print(random_num)
main_var.remove(random_num)
else:
# do something else

Tkinter Text widget returns ".!frame3.!frame3.!frame.!text" instead of appropriate values

I'm currently working on a project where you scan bar codes and it implements the result into an excel file. I am using tkinter to make my GUI, however, when I try to get the values from a text widget it returns the value ".!frame3.!frame3.!frame.!text". how can I fix this to get the appropriate values?
here is my code so far
import tkinter as tk
from tkinter import *
root = tk.Tk(className = "Tool Manager")
root.configure(bg='#C4C4C4')
root.title('Main Screen')
root.geometry("800x600")
main = Frame(root, bg='#C4C4C4', width = 800, height = 600)
#This is the contents of the Main Frame (screen 1)
frame_pad1 = Frame(main, bg='#C4C4C4')
frame_1 = Frame(main,bg='#C4C4C4')
frame_2 = Frame(main, bg='#C4C4C4')
frame_3 = Frame(main, bg='#C4C4C4')
min = Frame(root, bg = 'GREEN')
#mout stuffs
mout = Frame(root, bg = '#C4C4C4')
outframe_pad1 = Frame(mout, bg='#C4C4C4')
outframe_1 = Frame(mout, bg='#C4C4C4')
outframe_2 = Frame(mout, bg='#C4C4C4')
outframe_3 = Frame(mout, bg='#C4C4C4')
#code for changing screens
def raise_frame(frame):
frame.tkraise()
for frame in (main, min, mout):
frame.grid(row=1, column=1, sticky='news')
#sets frame weight for 3 rows (centers frames)
rows = 0
while rows < 3:
root.rowconfigure(rows, weight=1)
root.columnconfigure(rows,weight=1)
rows += 1
def commit_to_file():
ID = name.get()
out_list.get('1.0', 'end-1c')
print(out_list) #<----- THIS IS WHERE I'M RETURNING VALUES TO THE TERMINAL
def on_every_keyboard_input(event):
update_char_length(out_list)
#updating Line Length Information
def update_char_length(out_list):
string_in_text = out_list.get('1.0', '1.0 lineend')
string_length = len(string_in_text)
print(string_length)
if (string_length == 4):
out_list.insert(0.0, '\n')
out_list.mark_set("insert", "%d.%d" % (0,0))
#main screen formatting
area = PhotoImage(file="test.png")
areaLabel = Label(frame_1, image=area, bg='#C4C4C4')
areaLabel.pack(side=RIGHT)
mwLabel = Label(frame_2,text="this is only a test", font=("Airel", 20), bg='#C4C4C4')
mwLabel.pack(side=RIGHT)
out_button = Button(frame_3, text="Check Out", command=lambda:raise_frame(mout) , height=5, width=20, font=("Airel", 15))
out_button.pack(side=RIGHT, padx=20, pady = 4)
in_button = Button(frame_3, text="Check In", command=lambda:raise_frame(min), height=5, width=20, font=("Airel", 15))
in_button.pack(side=LEFT, padx=20, pady = 4)
#out screen formatting
name = Entry(outframe_1, font=("Airel", 15))
name.pack(side=RIGHT)
name_lbl = Label(outframe_1, text="ID Number", bg='#C4C4C4', font=("Airel", 15))
name_lbl.pack(side=LEFT)
outlist = Frame(outframe_2, bd=1, relief=SUNKEN)
outlist.pack(side=LEFT)
out_list = Text(outlist, height=30, width=40)
out_list.pack(side=RIGHT)
done_btn = Button(outframe_3, text="Done", command=commit_to_file, font=("Ariel", 15))
done_btn.pack(side=RIGHT, padx=20, pady=4)
#init to main screen
raise_frame(main)
#drawing objects for main screen
frame_pad1.pack(padx=1, pady=25)
frame_1.pack(padx=1,pady=1)
frame_2.pack(padx=10,pady=1)
frame_3.pack(padx=1, pady=80)
#drawing out screen
outframe_1.pack(padx=1, pady=1)
outframe_2.pack(padx=1,pady=1)
outframe_3.pack(padx=1, pady=1)
#calls line info update out screen
out_list.bind('<KeyRelease>', on_every_keyboard_input)
root.mainloop()
You are printing the command and not the value of it. Put the command in a variable and then print the variable.
Example: myVar = out_list.get("1.0", "end-1c") and then print(myVar)

For loop doesn't work properly for unknown reason

I have this code:
def show_hide(a, b, c, d):
if not b[0]["text"]: # check if text's length is 0
b[0].configure(text="{}".format(d[0]), bd=2, bg="white", command=lambda: activate_deactivate(a[0], c[0])) # configure button_1
c[0]["text"] = "Status: {}".format(a[0].get()) # set text for label_1
b[1].configure(text="{}".format(d[1]), bd=2, bg="white", command=lambda: activate_deactivate(a[1], c[1])) # configure button_2
c[1]["text"] = "Status: {}".format(a[1].get()) # set text for label_2
else:
b[0].configure(text="", bd=0, bg="#F0F0F0", command=None) # hide the button_1
c[0]["text"] = "" # hide the label_1
b[1].configure(text="", bd=0, bg="#F0F0F0", command=None) # hide the button_2
c[1]["text"] = "" # hide the label_2
My button which calls this function has this command value:
command=lambda: show_hide([status, status_2], [button, button_2], [label, label_2], ["Perform action #1", "Perform action #2"]))
By using it I can show/hide buttons but rewriting the same thing changing a digit in a few places would be tedious. To fix it I tried using this code instead of the original:
def show_hide(a, b, c, d):
for i in range(0, len(a)): # iterates over indexes of items in a,b,c,d lists (all 4 have same length) and passes them to the if/else statement
if not b[i]["text"]: # check if text length is 0
b[i].configure(text="{}".format(d[i]), bd=2, bg="white", command=lambda: activate_deactivate(a[i], c[i])) # configure buton
c[i]["text"] = "Status: {}".format(a[i].get()) # set label's text
else:
b[i].configure(text="", bd=0, bg="#F0F0F0", command=None) # hide button
c[i]["text"] = "" # hide label
Theoretically, this should work fine and using just 4 lines of code (not counting for/if/else lines) do the same thing as original function which would need 4 lines for EACH status+button+label created. BUT, as a matter of fact, it makes my 2 buttons work totally wrong.
I don't really understand what is wrong with it so I can't fully describe the problem, but you can see for yourself by using the test-script I made and replacing the show_hide function definition with the one using for-loop:
import tkinter as tk
import random
class ActionButton(tk.Button):
def __init__(self, *args, **kwargs):
tk.Button.__init__(self, *args, **kwargs)
self.configure(text="", font="courier 20", bd=0)
class ActionLabel(tk.Label):
def __init__(self, *args, **kwargs):
tk.Label.__init__(self, *args, **kwargs)
self.configure(text="", font="courier 14")
def multi(*args):
for func in args:
return func
def show_hide(a, b, c, d):
if not b[0]["text"]:
b[0].configure(text="{}".format(d[0]), bd=2, bg="white", command=lambda: activate_deactivate(a[0], c[0]))
c[0]["text"] = "Status: {}".format(a[0].get())
b[1].configure(text="{}".format(d[1]), bd=2, bg="white", command=lambda: activate_deactivate(a[1], c[1]))
c[1]["text"] = "Status: {}".format(a[1].get())
else:
b[0].configure(text="", bd=0, bg="#F0F0F0", command=None)
c[0]["text"] = ""
b[1].configure(text="", bd=0, bg="#F0F0F0", command=None)
c[1]["text"] = ""
def activate_deactivate(a, c):
if a.get() == "Can be done":
a.set("To be done")
c.configure(text="Status: {}".format(a.get()), fg="blue")
else:
a.set("Can be done")
c.configure(text="Status: {}".format(a.get()), fg="black")
def step_forward(a, b, c):
if a.get() == "To be done":
b.configure(text="", bd=0, bg="#F0F0F0", state="disabled")
c["text"] = ""
result = random.choice(["success", "failure"])
if result == "success":
a.set("Accomplished")
c["fg"] = "green"
else:
a.set("Failed")
c["fg"] = "red"
else:
b.configure(text="", bd=0, bg="#F0F0F0", command=None)
c["text"] = ""
root = tk.Tk()
status = tk.StringVar()
status.set("Can be done")
status_2 = tk.StringVar()
status_2.set("Can be done")
main = tk.Button(root, text="Show/Hide", bg="white", font="courier 30",
command=lambda: show_hide([status, status_2],
[button, button_2],
[label, label_2],
["Perform action #1", "Perform action #2"]))
main.pack()
frame = tk.Frame(root, pady=10)
frame.pack()
frame_1 = tk.Frame(frame, padx=10)
frame_1.pack(side="left")
frame_2 = tk.Frame(frame, padx=10)
frame_2.pack(side="left")
button = ActionButton(frame_1)
button.grid(row=0, column=0)
label = ActionLabel(frame_1)
label.grid(row=1, column=0)
button_2 = ActionButton(frame_2)
button_2.grid(row=0, column=1)
label_2 = ActionLabel(frame_2)
label_2.grid(row=1, column=1)
next_day = tk.Button(root, text="Next day", bg="white", font="courier 30",
command=lambda: multi(step_forward(status, button, label),
step_forward(status_2, button_2, label_2)))
next_day.pack()
root.mainloop()
I hope there's someone who may know how to fix this and maybe even has an idea about how the function could be changed to perform everything properly.

Categories

Resources