Learn Python tkinter GUI buttons easy 🛎️

preview_player
Показать описание

Python Tkinter GUI button tutorial for beginners
#Python #Tkinter #GUI #button #buttons #tutorial #beginners

# button = you click it, then it does stuff

from tkinter import *

count = 0

def click():
global count
count+=1

window = Tk()
button = Button(window,text='Click me!!!')
label = Label(window,text=count)
label2 = Label(window,image=image)
Рекомендации по теме
Комментарии
Автор

# button = you click it, then it does stuff

from tkinter import *

count = 0

def click():
global count
count+=1
label.config(text=count)
#label2.pack()

window = Tk()
button = Button(window, text='Click me!!!')
button.config(command=click) #performs call back of function
button.config(font=('Ink Free', 50, 'bold'))
button.config(bg='#ff6200')
button.config(fg='#fffb1f')


image =
button.config(image=image)

#disabled button (ACTIVE/DISABLED)
label = Label(window, text=count)
label.config(font=('Monospace', 50))
label.pack()
button.pack()
label2 = Label(window, image=image)
window.mainloop()

BroCodez
Автор

Actually makes sense unlike the other tutorials that don't explain why..

I'm subscribing and liking now.

iqpprevail
Автор

This Was Seriously SUCH A USEFUL TUTORIAL. KEEP IT UP BRO!

SLASH-VLT
Автор

Your video is very well explained.

If I add a fews entries, then a value to each of them. How can I get each of the values and add them up?
Here are the codes. Thanks

from tkinter import *

root=Tk()


somme=0
def add_button():
global somme
somme +=1
for i in range(somme):
lab1=Label(root, text='lab1')
lab1.grid(row=i, column=1)
entry1=Entry(root)
entry1.grid(row=i, column=2)



bouton_add=Button(root, text='Create widget', command=add_button )
bouton_add.grid(row=5, column=0)

root.mainloop()

adnerremy
Автор

Isnt there a way to set the color of the button when the other parameters are being filled out? Like: button(root, text=" ", bg= 'red' ) ?

marshallwages
Автор

It was awesome, thnak you.
btw, i tried, that the button.config arguments can write in one command, separate them with comma, like in your label video.

moo_HU
Автор

oh thank you very much I will subscribe🎉

Naninigaw
Автор

Thanks to your tutorial I learned something logic

amegomusictv
Автор

The professionalism is surprising, but welcome.

BronzeBagel
Автор

And sooo good at teaching
I can understand it very fast 😊😊😊

s.mohammedjunaith
Автор

*_Amazing video! I already am saying that before the tutorial began!_* 😀👍

EquaTechnologies
Автор

Gaw damn this was so much helpful, I’ve been looking for how to understand these buttons and labels n how to change the color too and you helped me a lot, thank you

laniakea
Автор

brief, to the point ... super
keep it up

mohamedselim
Автор

Another one is amazing in the discription
Thanks for easy writing of code
😃😃😃😃😃

s.mohammedjunaith
Автор

you are so good to teach :) thank you very much

nandikajayampathi
Автор

Great video. Thank you for writing the code in the comment. It is very helpful

hadiaal-amine
Автор

could u explain how to make the button bigger or change its postion

TheFlashKageUzumaki
Автор

I'm Still New To tkinter So Can You Please Explain .pack()

SLASH-VLT
Автор

10:40 OMG YOU ARE THE BEST. NEVER FOUND THIS ANYWHERE. Thank you so much. Like and sub!😱😱😱

kleinerdiamant-bs
Автор

hi, I have a question, what program r u using? Great video btw, rlly helped

guyon