- 1
How to make button with python codes
Help me to learn bruhh
1 Odpowiedź
0
# kivy
from kivy.app import App
from kivy.uix.button import Button
class ButtonApp(App):
def build(self):
btn = Button(text ="Push Me !")
return btn
root = ButtonApp()
root.run()
# tkinter
from tkinter import *
from tkinter.ttk import *
root = Tk()
root.geometry('500x400')
btn = Button(root, text = 'Click me !', command = root.destroy)
btn.pack(side = 'top')
root.mainloop()