Learn Python tkinter GUI checkboxes easy ✔️

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 40

  • @BroCodez
    @BroCodez  4 года назад +8

    from tkinter import *
    def display():
    if(x.get()==1):
    print("You agree!")
    else:
    print("You don't agree :(")
    window = Tk()
    x = IntVar()
    python_photo = PhotoImage(file='Python.png')
    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()

  • @slickwillie3376
    @slickwillie3376 3 года назад +3

    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.

  • @piotrkopcewicz5227
    @piotrkopcewicz5227 Год назад +1

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

  • @mohamedselim6547
    @mohamedselim6547 3 года назад +1

    Brief, to the point
    Thanks for sharing
    Keep it up

  • @amanda-janedeagrella5020
    @amanda-janedeagrella5020 Год назад +1

    Fantastic explanation so professional 🙏🏼👏🏻

  • @megabond81
    @megabond81 9 месяцев назад

    Thanks buddy! Your video is the best on youtube.

  • @manuelvaal1257
    @manuelvaal1257 2 года назад

    so far it is lovely. you are a legend

  • @lam8322
    @lam8322 3 года назад +4

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

  • @PratikGaikwad-t6p
    @PratikGaikwad-t6p 6 дней назад

    help me lot for the exam

  • @Amir_Plays_non_stop
    @Amir_Plays_non_stop 3 года назад +1

    As usual great video!

  • @abigailtesfaye3122
    @abigailtesfaye3122 7 месяцев назад

    thank you thank you thank you so much i love u

  • @SuperStarEevee
    @SuperStarEevee 2 года назад

    Thank you!

  • @susyleethgonzalez5585
    @susyleethgonzalez5585 Год назад

    Thanks!!! I hope your pandas course

  • @_Modul_Asis
    @_Modul_Asis 2 года назад

    Please make video how to insert image in GUI

  • @rubenc4696
    @rubenc4696 5 месяцев назад

    Thanks

  • @borja4015
    @borja4015 4 года назад +2

    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!

    • @BroCodez
      @BroCodez  4 года назад +1

      I don't have much experience with GitHub, so I don't want to give you the wrong advice. But I do know that many people do post their code to share in a form that is called a 'gist'. That may be what you are looking for.

  • @lw9954
    @lw9954 2 года назад

    Ty Bro!

  • @orfredymelobeltran5237
    @orfredymelobeltran5237 3 года назад

    I love this one

  • @Desperate4Freedom.
    @Desperate4Freedom. 3 года назад

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

  • @barara8794
    @barara8794 3 года назад

    NIce

  • @truquichan
    @truquichan Год назад

    Great!

  • @uuhju7004
    @uuhju7004 3 года назад

    nice

  • @darind2158
    @darind2158 4 года назад

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

  • @EissaAlahdul
    @EissaAlahdul 2 года назад

    شكرا

  • @murilosilvestre7736
    @murilosilvestre7736 3 года назад

    Nice!

  • @haniyasaeed1853
    @haniyasaeed1853 2 года назад

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

  • @creator6714
    @creator6714 8 месяцев назад

    Was this video helpful? ✓

  • @kauedasilva1072
    @kauedasilva1072 Год назад

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

    • @InformatikaVseProsto
      @InformatikaVseProsto Год назад

      You can do this using the set() method. For example:
      t=IntVar()
      t.set(1)
      k = Checkbutton(window,
      text="message text",
      onvalue=1,
      ofvalue=0)
      k.pack()

  • @nuonduch585
    @nuonduch585 3 года назад

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

  • @beingzero7541
    @beingzero7541 2 года назад

    Wow!

  • @jhassee
    @jhassee Год назад

    myMan

  • @darind2158
    @darind2158 4 года назад

    can u tell me why i cant ser the box

    • @BroCodez
      @BroCodez  4 года назад

      hmmmm are you using .pack() ?

  • @gustavoaponte1814
    @gustavoaponte1814 Год назад

    meow meow meow~!

  • @philtoa334
    @philtoa334 3 года назад

    oky.

  • @shahzodsayfiddinov6516
    @shahzodsayfiddinov6516 3 года назад

    Thank you!