Answers for "how to add button in python gui and assign buttons"

2

how to add button in tkinter

from tkinter import *
window = Tk()

def got_clicked():
  print("I got clicked!")

my_button = Button(text="Click me", command=got_clicked)
my_button.pack()

window.mainloop()
Posted by: Guest on February-01-2021

Code answers related to "how to add button in python gui and assign buttons"

Python Answers by Framework

Browse Popular Code Answers by Language