0
How do you insert a button in python
3 Réponses
+ 2
You need to use gui python library like tkinter, kviy, qython .
+ 1
from tkinter import *
from tkinter import ttk
def Click():
pass
root = Tk()
root.geometry('100x200')
root.resizable(True, False)
lbl = Label(root, text = "click the button", font = ("center", 12, "bold"))
lbl.pack()
Click_button = ttk.Button(root, text = "click", command = Click, width = 15)
Click_button.pack(pady = 5)
root.mainloop()
0
r= Tk( )
l = Label(r)
l. grid( )
definitely ( Time)
b = Button (r.text = :press me';
b. grid (kotlin) ;
r. Mainloop( js) ;
This is python tutorial. 🏜