Python tkinter setup a basic GUI 🐍

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น • 173

  • @BroCodez
    @BroCodez  4 ปีที่แล้ว +50

    from tkinter import *
    window = Tk() #instantiate an instance of a window
    window.geometry("420x420")
    window.title("Bro Code first GUI program")
    icon = PhotoImage(file='logo.png')
    window.iconphoto(True,icon)
    window.config(background="#5cfcff")
    window.mainloop() #place window on computer screen, listen for events

    • @JA-ym1tc
      @JA-ym1tc ปีที่แล้ว +3

      couldn't recognize data in image file "h.jpg"

    • @udayvadecha2973
      @udayvadecha2973 ปีที่แล้ว

      please share nuclear launching codes for better World😊🤣

    • @irenazgaljic4000
      @irenazgaljic4000 2 หลายเดือนก่อน

      What tool you are using

  • @kevinrussell6530
    @kevinrussell6530 ปีที่แล้ว +7

    You have a great, simple way of teaching. What a relief! To have this ability in this heavily tech loaded and confusing industry is priceless! Thank you!

  • @ji23delgado
    @ji23delgado 4 ปีที่แล้ว +18

    You are so awesome at explaining these things
    I can't believe you're a hidden gem in the programming world

  • @RajatTiruwa-q9v
    @RajatTiruwa-q9v 3 หลายเดือนก่อน

    Bro code you are one of the best teacher which teaches programming in the best way you can , Thanks for this playlist this will gonna help us most of the way.

  • @gmwillis2000
    @gmwillis2000 ปีที่แล้ว +2

    This guy is top of the line. So clear and logical.

  • @IThinkItsMe
    @IThinkItsMe 8 หลายเดือนก่อน +16

    Brilliant video. Who's learning in 2024? Where's my 2024 family?

  • @Kragatar
    @Kragatar ปีที่แล้ว +8

    "We should give our window a unique name, such as window." 😂
    Great tutorial.

  • @barnaatakacs1600
    @barnaatakacs1600 4 ปีที่แล้ว +10

    Great series, so far the best for me🔥

    • @Pjnpm
      @Pjnpm 3 ปีที่แล้ว

      I agree

  • @apk_academy
    @apk_academy ปีที่แล้ว

    I love you teachings.
    I love the way you taught me Cascading Style Sheet.
    God bless you.

  • @NotExxo
    @NotExxo ปีที่แล้ว

    thats sick this is one of the easiest tutorials of making a gui i've seen in my life

  • @astro1936
    @astro1936 16 วันที่ผ่านมา

    that's really a brooo attitude, love the content so much ❤

  • @Darryleks01
    @Darryleks01 วันที่ผ่านมา

    Really enlightening

  • @MrExplorer0
    @MrExplorer0 4 หลายเดือนก่อน

    Underrated channel. Nice explanation, and free code.

  • @kapibara2440
    @kapibara2440 ปีที่แล้ว

    So much learned from this Channel! Thank you Bro from the bottom of my heart 😊

  • @ishmaelnaga8628
    @ishmaelnaga8628 4 หลายเดือนก่อน

    Your the best @Bro Code 💪💪

  • @richardwang7965
    @richardwang7965 ปีที่แล้ว

    The explanation is very clear, thanks

  • @tarik8543
    @tarik8543 2 ปีที่แล้ว +1

    Great video Bro. I wish you well in your future endeavours.

  • @rafaelsfasie5347
    @rafaelsfasie5347 10 หลายเดือนก่อน

    Very good video. I learn more from you than from college. Btw for this tutorial I work in Linux Mint.

  • @madhavjoshi9040
    @madhavjoshi9040 7 หลายเดือนก่อน

    Wow! Lucid explanation!! Thank you!!!

  • @ARPITHAAM
    @ARPITHAAM 2 หลายเดือนก่อน

    Clear explanation 👌

  • @nidhidhanyadaneshdevadarsa533
    @nidhidhanyadaneshdevadarsa533 8 หลายเดือนก่อน

    best tutorial ever i love it😃😃😃😃😃😃

  • @joyomanda375
    @joyomanda375 8 หลายเดือนก่อน

    Nice & easy explanation!

  • @moo_HU
    @moo_HU 5 หลายเดือนก่อน

    Great style, also great explanation.Thx.

  • @hamzazad5258
    @hamzazad5258 10 หลายเดือนก่อน

    best video...i feel like im started doing something with code!

  • @samienyendwa8785
    @samienyendwa8785 21 วันที่ผ่านมา

    Thank you for the video

  • @chrisdavies6221
    @chrisdavies6221 2 ปีที่แล้ว

    Excellent content, but most importantly, I'm loving the funky music at the end.

  • @NotSoz.
    @NotSoz. ปีที่แล้ว

    thank you so much! this tutorial was really straightforward, and really helped me!

  • @toasty-boy
    @toasty-boy หลายเดือนก่อน

    very good video. bravo

  • @alphabah770
    @alphabah770 ปีที่แล้ว

    I enjoyed it🎉

  • @VikramnathV91
    @VikramnathV91 13 วันที่ผ่านมา

    thanks for the tutorials bro! Cheers!!

  • @dion-t8x
    @dion-t8x 24 วันที่ผ่านมา

    Love it!🎉🎉

  • @kazansergei
    @kazansergei 6 หลายเดือนก่อน

    nice work!!

  • @cristiucvladimir7909
    @cristiucvladimir7909 9 หลายเดือนก่อน

    Thanks for amazing content!

  • @frankbeats733
    @frankbeats733 8 หลายเดือนก่อน

    this is just amazing thank you so much

  • @Tim1Awesome
    @Tim1Awesome ปีที่แล้ว +17

    if anyone having problem with the icon, tkinter doesn't accept .jpg photos, try converting the photo to .png

    • @ov3rd0se
      @ov3rd0se ปีที่แล้ว +2

      i did but still, same issue

    • @Tim1Awesome
      @Tim1Awesome ปีที่แล้ว

      @@ov3rd0se did you save the image from Google as "all files" then put .png in the title? or what did you do?

    • @Hg31415
      @Hg31415 10 หลายเดือนก่อน

      Thank you

    • @ember-k6k
      @ember-k6k 3 หลายเดือนก่อน

      ​@@ov3rd0seAnd do you have any thoughts of how it can be used to use the image because I'm having the same problem with a .PNG file

    • @ember-k6k
      @ember-k6k 3 หลายเดือนก่อน

      ​@@Tim1Awesome so do I have to save and outside of a python file because I'm having the same problem I try to JPG in a PNG file I tried a couple ways of manipulating it but there hasn't been anything that has worked sorry

  • @EmmanuelThabit
    @EmmanuelThabit หลายเดือนก่อน

    Thanks for the vid

  • @HansiKlein
    @HansiKlein ปีที่แล้ว +1

    Nuclear codes^^ great just greate!

  • @voidgaming1402
    @voidgaming1402 ปีที่แล้ว

    Really good video

  • @anonperson-p2x
    @anonperson-p2x ปีที่แล้ว

    Brooo that is some Giga Chad content! Thanks.

    • @corey-h2k
      @corey-h2k 6 หลายเดือนก่อน

      what dose he use to write this

  • @md.moijeuddinmolla1328
    @md.moijeuddinmolla1328 ปีที่แล้ว

    You made it so easy bro.

  • @pascalmmuzungu173
    @pascalmmuzungu173 ปีที่แล้ว

    Very Helpful!

  • @Ayushsharma-ly3wt
    @Ayushsharma-ly3wt ปีที่แล้ว

    bro took the master degree of explaining

  • @MOdithaFernando
    @MOdithaFernando ปีที่แล้ว +3

    3:59 Nuclear launch codes😅

  • @johnlouchard4721
    @johnlouchard4721 3 ปีที่แล้ว +2

    Muito obrigado por essa incrível explicação, de como colocar ícone ao lado do título.

  • @planktongunslinger5730
    @planktongunslinger5730 ปีที่แล้ว +1

    Btw to anyone wondering why the window.iconphoto() doesn't works, try resizing the icon smaller. I resized mine to near at 800x800 pm (wasnt accurate)

  • @haaruncaderrr
    @haaruncaderrr 7 หลายเดือนก่อน

    superrrr coolll

  • @iron4537
    @iron4537 5 หลายเดือนก่อน +1

    i almost had a stroke because of how you pronounced GUI

  • @FRANCOPROHOLA
    @FRANCOPROHOLA ปีที่แล้ว

    Nice video! :D

  • @garrison4825
    @garrison4825 หลายเดือนก่อน

    very cool!!

  • @Sub-w3x
    @Sub-w3x 2 ปีที่แล้ว

    Kindly face revealed , and also add Q/A ABOUT UR LIFE AND PROGRAMMING

  • @lucyledezma709
    @lucyledezma709 4 ปีที่แล้ว

    Hello Bro!!!. Thanks for the tutorial!

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว

      thank you as always Lucy

  • @hauzantsaaqifmushaddaq1155
    @hauzantsaaqifmushaddaq1155 3 ปีที่แล้ว

    Thank you sir, it's cool to do😂

  • @srijanpaul427
    @srijanpaul427 10 หลายเดือนก่อน

    Thanks bro 😅

  • @hostvind
    @hostvind 3 ปีที่แล้ว

    that was my favorite colour )

  • @ItsOluf
    @ItsOluf 2 ปีที่แล้ว +1

    nice

  • @ENGINEERINGSTUDENT-kk8sb
    @ENGINEERINGSTUDENT-kk8sb 2 ปีที่แล้ว

    Thanks bro 😁

  • @mohamednasr5647
    @mohamednasr5647 25 วันที่ผ่านมา

    Nice

  • @majik725
    @majik725 4 หลายเดือนก่อน

    Bro, this bro is the bro

  • @mateoreardon9868
    @mateoreardon9868 8 หลายเดือนก่อน

    bros actually helpful

  • @emiliocanals4520
    @emiliocanals4520 2 ปีที่แล้ว

    This is amazing!

  • @kanishkakamal9876
    @kanishkakamal9876 2 ปีที่แล้ว

    Thank you Bro Code.

  • @alish1961
    @alish1961 2 ปีที่แล้ว

    Thanks 🙏

  • @bot-maty
    @bot-maty 27 วันที่ผ่านมา

    khobeh

  • @jeewonheo843
    @jeewonheo843 3 ปีที่แล้ว +8

    I keep getting _tkinter.TclError: couldn't recognize data in image file "GUI/a.png" error. furthermore it says the version of tkinter is deprecated. I am using mac catalina btw. do you know what's the problem?

    • @davidcalebpaterson7101
      @davidcalebpaterson7101 3 ปีที่แล้ว +1

      Try updating python since tkinter is built-in and comes with python.

    • @SAGARSINGH-ej4rj
      @SAGARSINGH-ej4rj ปีที่แล้ว

      Bro type smaller case "file=" not "File="

    • @gamemonster9179
      @gamemonster9179 ปีที่แล้ว

      Resize it to a smaller size

    • @saycheesesun
      @saycheesesun 3 หลายเดือนก่อน

      what worked for me is to download an older version of python

  • @logeshwaran3016
    @logeshwaran3016 3 ปีที่แล้ว

    Bro love you ❤️

  • @unityhd3144
    @unityhd3144 ปีที่แล้ว

    good vid

  • @sergebourlon186
    @sergebourlon186 10 หลายเดือนก่อน

    How open python program only into window tkinter and no to the console cmd or VSC ?

  • @CubingRecords1234
    @CubingRecords1234 หลายเดือนก่อน

    whenever i type
    window = Tk()
    it says
    "the name Tk is not defined"
    how do i fix this

  • @geniusac6474
    @geniusac6474 2 ปีที่แล้ว

    Bros a Genius

  • @saycheesesun
    @saycheesesun 3 หลายเดือนก่อน

    I need help whenever i try to run it the console says (That probably means that Tcl wasnt installed properly)

  • @tee-hee9553
    @tee-hee9553 2 ปีที่แล้ว +3

    Hello bro code and everyone
    I need help with customize dark mode title bar in
    Tkinter.
    The only thing I know is that disable windows bar and create new but is there a way to change background color of window bar using just a simple code I mean a short one ?😟

    • @TheJossephc
      @TheJossephc ปีที่แล้ว

      Did you solve it?

    • @TheJossephc
      @TheJossephc ปีที่แล้ว

      Could you solve it?

  • @Sheharyar69420
    @Sheharyar69420 6 หลายเดือนก่อน

    Wow!

  • @prizepig
    @prizepig 2 ปีที่แล้ว

    Hey Bro, on Windows the icon changes inside the window object but not in the taskbar. Is there a way to change the taskbar image as well?

  • @arrayannayaga5140
    @arrayannayaga5140 หลายเดือนก่อน

    thank you

  • @yahlikejazz
    @yahlikejazz ปีที่แล้ว

    "Ery Noice" -Jeremy Clarkson

  • @supurcartoonandmovie6605
    @supurcartoonandmovie6605 2 หลายเดือนก่อน

    good

  • @wingerfivem
    @wingerfivem ปีที่แล้ว

    Thank u

  • @prdus
    @prdus 6 หลายเดือนก่อน +1

    "gooey"

  • @HussainAli-sb1dv
    @HussainAli-sb1dv ปีที่แล้ว

    love u

  • @rubenc4696
    @rubenc4696 9 หลายเดือนก่อน

    Thanks

  • @DibyajyotiSarkar-q9m
    @DibyajyotiSarkar-q9m 2 หลายเดือนก่อน

    thanks

  • @dcsharma0107
    @dcsharma0107 3 ปีที่แล้ว +3

    Hey Bro, how can we add .jpg images in the GUI window, can u please help me

    • @michael3k80
      @michael3k80 2 ปีที่แล้ว +1

      got the same problem JPG is no go for now. error _tkinter.TclError: couldn't recognize data in image

    • @dcsharma0107
      @dcsharma0107 2 ปีที่แล้ว +1

      @@michael3k80 I got the solution bro, i will share it with you

    • @michael3k80
      @michael3k80 2 ปีที่แล้ว +1

      @@dcsharma0107 would be thankful for it. Its kinda strange that such a popular type is not supported

    • @dcsharma0107
      @dcsharma0107 2 ปีที่แล้ว +1

      from PIL import Image, ImageTk ------> (pip install pillow)
      image = Image.open("F:\\Python Files\\My Pic.jpg")
      photo = ImageTk.PhotoImage(image)

  • @SuperStarEevee
    @SuperStarEevee 2 ปีที่แล้ว

    Thank you!

    • @BroCodez
      @BroCodez  2 ปีที่แล้ว +1

      You're welcome!

  • @beingzero7541
    @beingzero7541 3 ปีที่แล้ว

    Wow!

  • @Amir_Plays_non_stop
    @Amir_Plays_non_stop 3 ปีที่แล้ว +2

    GUI are really exciting (❁´◡`❁)

  • @corey-h2k
    @corey-h2k 6 หลายเดือนก่อน

    what do u use to write this

  • @EissaAlahdul
    @EissaAlahdul 2 ปีที่แล้ว

    شكرا

  • @rone3178
    @rone3178 หลายเดือนก่อน

    returns an error Tcl wasn't installed. How to fix it? help

  • @anafel8124
    @anafel8124 2 ปีที่แล้ว +2

    BRO why am i getting this error??
    ModuleNotFoundError: No module named 'tkinter'

  • @hayzelbula9187
    @hayzelbula9187 2 หลายเดือนก่อน

    😊

  • @Amir_Plays_non_stop
    @Amir_Plays_non_stop 3 ปีที่แล้ว

    Hmmm why the intro was soo fast? You spoke like you were in a hurry xD

  • @apk_academy
    @apk_academy ปีที่แล้ว

    Hello bro

  • @ligdjumvidja8294
    @ligdjumvidja8294 ปีที่แล้ว

    420x420 is good 😁

  • @farhan8834
    @farhan8834 2 ปีที่แล้ว

  • @daniiaaa3
    @daniiaaa3 ปีที่แล้ว

    Why can't i display the image? It keeps saying file not found even tho I tried to put path and file name and neither of them worked
    Do i need to install PIL?

    • @daniiaaa3
      @daniiaaa3 ปีที่แล้ว

      Nvm it worked

    • @Hg31415
      @Hg31415 10 หลายเดือนก่อน

      @@daniiaaa3 how?

    • @jackgoddard4521
      @jackgoddard4521 7 หลายเดือนก่อน

      I used the relative path and it works

  • @Wemadeit-
    @Wemadeit- 2 ปีที่แล้ว

    You did it east

  • @martinguarneros7222
    @martinguarneros7222 5 หลายเดือนก่อน

    😇

  • @oximas-oe9vf
    @oximas-oe9vf 2 ปีที่แล้ว +2

    when i puth in the line icon = PhotoImage(file = "C:\\Users\\Taghareed\\Desktop\\light bulb.gif")
    I get The error
    "couldn't recognize data in image file"
    I tried changing the file format, and it's location but it still gives me the error

    • @ImAbhishek3721
      @ImAbhishek3721 2 ปีที่แล้ว

      That's because You are not having the file named so in ur main project file

    • @gamemonster9179
      @gamemonster9179 ปีที่แล้ว

      U also have to make the image smaller

  • @uuhju7004
    @uuhju7004 3 ปีที่แล้ว

    ty

  • @gustavoaponte1814
    @gustavoaponte1814 ปีที่แล้ว

    Meow~! :3