how to make a button | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

how to make a button

how to make a button

12th May 2020, 4:37 AM
3A09 CHOW WUN FUNG
3A09 CHOW WUN FUNG - avatar
2 Answers
+ 7
Hello, you can make a button using any of the python GUI libraries -- Tkinter, PyQt, Kivy are some of the best python GUI toolkits. Tkinter is Python's de facto standard GUI ; ) btw you didn't mentioned any GUI library, A very simple eg of creating a button with Tkinter: _______________________ import tkinter as tk # setting root window: root = tk.Tk() root.title("Tk Button") # button widget: tk.Button(root, text="Your Button").pack() # window in mainloop: root.mainloop() _______________________ If you are interested in Tk see this simple tutorial too: https://youtu.be/BvzD2tAqMvU
12th May 2020, 4:49 AM
A C K
A C K - avatar
+ 3
I made a video about tkinter buttons: https://youtu.be/CLbruIr1Ehs
12th May 2020, 5:14 AM
Orango Mango
Orango Mango - avatar