Learn Python tkinter GUI checkboxes easy ✔️

preview_player
Показать описание
Python checkbox checkbutton tkinter GUI tutorial for beginners

#Python #checkbox #checkbutton #tkinter #GUI #tutorial #beginners

from tkinter import *

def display():
print("You agree!")
else:
print("You don't agree :(")

window = Tk()

x = IntVar()

check_button = Checkbutton(window,
text="I agree to something",
variable=x,
onvalue=1,
offvalue=0,
command=display,
font=('Arial',20),
fg='#00FF00',
bg='black',
activeforeground='#00FF00',
activebackground='black',
padx=25,
pady=10,
image=python_photo,
compound='left')

Рекомендации по теме
Комментарии
Автор

from tkinter import *

def display():
if(x.get()==1):
print("You agree!")
else:
print("You don't agree :(")

window = Tk()

x = IntVar()

python_photo =

check_button = Checkbutton(window,
text="I agree to something",
variable=x,
onvalue=1,
offvalue=0,
command=display,
font=('Arial', 20),
fg='#00FF00',
bg='black',
activeforeground='#00FF00',
activebackground='black',
padx=25,
pady=10,
image=python_photo,
compound='left')
check_button.pack()


window.mainloop()

BroCodez
Автор

I like the way you neatly list the attributes in readable form. I haven't seen anyone else do this yet, but it is so much better, more pleasant to code this way.

slickwillie
Автор

Brief, to the point
Thanks for sharing
Keep it up

mohamedselim
Автор

Still 30 video left eventually, I wonder what to learn about python after this course ?

lam
Автор

Fantastic explanation so professional 🙏🏼👏🏻

amanda-janedeagrella
Автор

I agree that this is a great tutorial !! thanks as always

piotrkopcewicz
Автор

Thanks buddy! Your video is the best on youtube.

megabond
Автор

thank you thank you thank you so much i love u <333

abigailtesfaye
Автор

Please make video how to insert image in GUI

_Modul_Asis
Автор

Hi, I have a question unrelated to this video, but you always replied to comments so I guessed I might post it here.
I have made some projects with python on my own, and I thought about including them somehow in my Curriculum Vitae, so that people can verify that they are mine while still looking kind of professional.
I'm not really sure how to do it. My first thought was a link to something like GitHub that is free (maybe GitHub itself if its free version allows to do what I want). Would you recommend something?
Thanks in advance!

borja
Автор

PLS REPLY how do u get that screen i only can use untilted file which isnt like that output

darind
Автор

hi Dude, how you doing? how did u manage have same bg color image as main? help

DesperateFreedom.
Автор

If have two checkbox I want to add to ButtonGroup like java how

nuonduch
Автор

But what if you want to be able to have the checkbox set by default?

kauedasilva
Автор

Hey bro
My active Foreground
And active background
Does not work
What should I do

haniyasaeed