Answers for "python working with buttons"

0

add button python

from tkinter import *


master = Tk()

#program you want the button to execute
def closewindow():
    exit()

#set up button
button = Button(master, text="close window", command=closewindow)

button.pack()

mainloop()
Posted by: Guest on July-06-2020
1

add a button on tkinter

import tkinter
button1 = ttk.Button(self, text="anything", command=random command)
        button1.pack()
Posted by: Guest on March-23-2020

Code answers related to "python working with buttons"

Python Answers by Framework

Browse Popular Code Answers by Language