Python tkinter setup a basic GUI 🐍

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

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

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

    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 10 หลายเดือนก่อน

      please share nuclear launching codes for better World😊🤣

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

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

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

    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!

  • @gmwillis2000
    @gmwillis2000 11 หลายเดือนก่อน +1

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

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

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

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

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

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

    Underrated channel. Nice explanation, and free code.

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

    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.

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

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

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

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

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

    Wow! Lucid explanation!! Thank you!!!

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

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

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

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

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

    Great style, also great explanation.Thx.

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

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

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

    The explanation is very clear, thanks

  • @ishmaelnaga8628
    @ishmaelnaga8628 17 วันที่ผ่านมา

    Your the best @Bro Code 💪💪

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

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

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

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

  • @Tim1Awesome
    @Tim1Awesome 9 หลายเดือนก่อน +8

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

    • @ov3rd0se
      @ov3rd0se 9 หลายเดือนก่อน +1

      i did but still, same issue

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

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

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

      Thank you

    • @ember-k6k
      @ember-k6k 4 วันที่ผ่านมา

      ​@@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 4 วันที่ผ่านมา

      ​@@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

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

    this is just amazing thank you so much

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

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

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

    Nice & easy explanation!

  • @Ayushsharma-ly3wt
    @Ayushsharma-ly3wt 9 หลายเดือนก่อน

    bro took the master degree of explaining

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

    Brooo that is some Giga Chad content! Thanks.

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

      what dose he use to write this

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

    Thanks for amazing content!

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

    You made it so easy bro.

  • @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)

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

    that was my favorite colour )

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

    Thank you sir, it's cool to do😂

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

    Hello Bro!!!. Thanks for the tutorial!

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

      thank you as always Lucy

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

    GUI are really exciting (❁´◡`❁)

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

    I enjoyed it🎉

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

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

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

    Very Helpful!

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

    "Ery Noice" -Jeremy Clarkson

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

    nice

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

    nice work!!

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

    i almost had a stroke because of how you pronounced GUI

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

    Really good video

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

    Nuclear codes^^ great just greate!

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

    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

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

    superrrr coolll

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

    This is amazing!

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

    3:59 Nuclear launch codes😅

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

    Thanks

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

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

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

    "gooey"

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

    Thank you Bro Code.

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

    Thanks 🙏

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

    Wow!

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

  • @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?

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

    😇

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

    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?

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

    Wow!

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

    bros actually helpful

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

    good vid

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

    Thanks bro 😅

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

    Thanks bro 😁

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

    Thank u

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

    Bro love you ❤️

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

    شكرا

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

    Nice video! :D

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

    Bros a Genius

  • @dcsharma0107
    @dcsharma0107 2 ปีที่แล้ว +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)

  • @majik725
    @majik725 28 วันที่ผ่านมา

    Bro, this bro is the bro

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

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

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

    ty

  • @HussainAli-sb1dv
    @HussainAli-sb1dv 11 หลายเดือนก่อน

    love u

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

    I noticed that 420x420 bro

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

    Thank you!

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

      You're welcome!

  • @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

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

    420x420 is good 😁

  • @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 ปีที่แล้ว

      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

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

    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?

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

      Nvm it worked

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

      @@daniaomari7238 how?

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

      I used the relative path and it works

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

    You did it east

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

    what do u use to write this

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

    i juste started to learn python but the window is somehow not showing up

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

      nvm

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

    Hello bro

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

    Meow~! :3

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

    ok Bro so if your listening, I'm willing to pay you to make me dangerous with this

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

    Algorithm

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

    _tkinter. TclError: couldn't recognize data in image file "qwerty.jpg". Help me please with this error 🙏

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

      U have to resize it to a smaller size,I had the same prblem

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

      did you solve it? can you help me with it?

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

      @@gamemonster9179 how do I do that?

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

      @@Hg31415 go to the file,and crop it to a smaller size,or find another one which is smaller than that pic

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

    Comment!

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

    what is your IDE?

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

      bro code uses visual studio code

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

      @@oximas-oe9vf No he actually uses PyCharm

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

    anyone know what program hes using?

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

      Python?

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

      Pycharm

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

    Can i use Visual Studio Code for this python code?

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

      late reply but yes

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

    bruh

  • @pianomaster212
    @pianomaster212 3 หลายเดือนก่อน +1

    My code isn't working. Here's my code:
    from tkinter import *
    window = Tk()
    window.geometry("420x420")
    window.mainloop()
    My error says that "Tcl" probably wasn't installed properly. Does anyone know what I did wrong?

  • @BEASTVERSE.07
    @BEASTVERSE.07 9 หลายเดือนก่อน

    window.geometry("420×420") in not working its says this _tkinter.TclError: bad geometry specifier "420×420" , anyone can help me plz

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

    شكرا

  • @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

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

      have you solved the problem? because i have the same problem :(

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

      @@alexpython3506 I can't remember if I fixed it, Try using a different version of python and
      tell me if it works

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

      @@oximas-oe9vf i solved this problem after a few minutes i wrote this comment, i just change the file and changed his size i think this happen because of size of file just change size and try again

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

      @@alexpython3506 ok thank you❤❤❤

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

      @@oximas-oe9vf you're welcome❤

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

    شكرا