Python GUI windows 🖼️

Поделиться
HTML-код
  • Опубликовано: 21 сен 2020
  • Python tkinter GUI tutorial for beginners
    #Python #tkinter #GUI #tutorial #beginners
    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
  • НаукаНаука

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

  • @BroCodez
    @BroCodez  3 года назад +35

    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 Год назад +2

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

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

      please share nuclear launching codes for better World😊🤣

  • @ji23delgado
    @ji23delgado 3 года назад +14

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

  • @kevinrussell6530
    @kevinrussell6530 11 месяцев назад +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 8 месяцев назад +1

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

  • @Tim1Awesome
    @Tim1Awesome 6 месяцев назад +6

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

    • @ov3rd0se
      @ov3rd0se 6 месяцев назад +1

      i did but still, same issue

    • @Tim1Awesome
      @Tim1Awesome 6 месяцев назад

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

    • @user-ju8ws6xz3i
      @user-ju8ws6xz3i 3 месяца назад

      Thank you

  • @Kragatar
    @Kragatar 11 месяцев назад +5

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

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

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

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

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

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

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

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

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

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

  • @joyomanda375
    @joyomanda375 Месяц назад

    Nice & easy explanation!

  • @madhavjoshi9040
    @madhavjoshi9040 Месяц назад

    Wow! Lucid explanation!! Thank you!!!

  • @cristiucvladimir7909
    @cristiucvladimir7909 2 месяца назад

    Thanks for amazing content!

  • @richardwang7965
    @richardwang7965 6 месяцев назад

    The explanation is very clear, thanks

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

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

  • @hamzazad5258
    @hamzazad5258 3 месяца назад

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

  • @nidhidhanyadaneshdevadarsa533
    @nidhidhanyadaneshdevadarsa533 2 месяца назад

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

  • @kazansergei
    @kazansergei 3 дня назад

    nice work!!

  • @johnlouchard4721
    @johnlouchard4721 2 года назад +2

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

  • @pascalmmuzungu173
    @pascalmmuzungu173 10 месяцев назад

    Very Helpful!

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

    Brooo that is some Giga Chad content! Thanks.

  • @frankbeats733
    @frankbeats733 2 месяца назад

    this is just amazing thank you so much

  • @alphabah770
    @alphabah770 6 месяцев назад

    I enjoyed it🎉

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

    Really good video

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

    This is amazing!

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

    Wow!

  • @rafaelsfasie5347
    @rafaelsfasie5347 3 месяца назад

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

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

    Thank you sir, it's cool to do😂

  • @FRANCOPROHOLA
    @FRANCOPROHOLA 10 месяцев назад

    Nice video! :D

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

    Hello Bro!!!. Thanks for the tutorial!

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

      thank you as always Lucy

  • @haaruncaderrr
    @haaruncaderrr 28 дней назад

    superrrr coolll

  • @md.moijeuddinmolla1328
    @md.moijeuddinmolla1328 Год назад

    You made it so easy bro.

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

    Bro love you ❤️

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

  • @hostvind
    @hostvind 2 года назад +1

    that was my favorite colour )

  • @Ayushsharma-ly3wt
    @Ayushsharma-ly3wt 6 месяцев назад

    bro took the master degree of explaining

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

    nice

  • @mateoreardon9868
    @mateoreardon9868 Месяц назад

    bros actually helpful

  • @HansiKlein
    @HansiKlein 10 месяцев назад

    Nuclear codes^^ great just greate!

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

    good vid

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

    ty

  • @ENGINEERINGSTUDENT-kk8sb
    @ENGINEERINGSTUDENT-kk8sb Год назад

    Thanks bro 😁

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

    Thanks 🙏

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

    Thank you Bro Code.

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

    GUI are really exciting (❁´◡`❁)

  • @yahlikejazz
    @yahlikejazz 6 месяцев назад

    "Ery Noice" -Jeremy Clarkson

  • @srijanpaul427
    @srijanpaul427 3 месяца назад

    Thanks bro 😅

  • @planktongunslinger5730
    @planktongunslinger5730 9 месяцев назад +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)

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

  • @IThinkItsMe
    @IThinkItsMe Месяц назад

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

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

    شكرا

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

    Thanks

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

    Thank you!

  • @HussainAli-sb1dv
    @HussainAli-sb1dv 8 месяцев назад

    love u

  • @wingerfivem
    @wingerfivem 10 месяцев назад

    Thank u

  • @jeewonheo843
    @jeewonheo843 2 года назад +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?

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

    Bros a Genius

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

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

  • @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 9 месяцев назад

      Did you solve it?

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

      Could you solve it?

  • @sergebourlon186
    @sergebourlon186 3 месяца назад

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

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

    Meow~! :3

  • @prdus
    @prdus 4 дня назад

    "gooey"

  • @MOdithaFernando
    @MOdithaFernando 10 месяцев назад +1

    3:59 Nuclear launch codes😅

  • @oximas-oe9vf
    @oximas-oe9vf Год назад +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 9 месяцев назад

      U also have to make the image smaller

  • @Wemadeit-
    @Wemadeit- Год назад

    You did it east

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

  • @anafel8124
    @anafel8124 Год назад +2

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

  • @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 Год назад +1

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

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

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

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

    I noticed that 420x420 bro

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

    Algorithm

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

    Can i use Visual Studio Code for this python code?

    • @pythooon
      @pythooon 6 месяцев назад

      late reply but yes

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

    Hello bro

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

    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?

  • @ligdjumvidja8294
    @ligdjumvidja8294 6 месяцев назад

    420x420 is good 😁

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

    Comment!

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

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

    • @gamemonster9179
      @gamemonster9179 9 месяцев назад +1

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

    • @user-ju8ws6xz3i
      @user-ju8ws6xz3i 3 месяца назад

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

    • @user-ju8ws6xz3i
      @user-ju8ws6xz3i 3 месяца назад

      @@gamemonster9179 how do I do that?

    • @gamemonster9179
      @gamemonster9179 3 месяца назад

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

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

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

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

    anyone know what program hes using?

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

    what is your IDE?

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

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

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

    bruh

  • @pianomaster212
    @pianomaster212 11 дней назад +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?

  • @Beastunleashed.07
    @Beastunleashed.07 6 месяцев назад

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

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

    شكرا

  • @oximas-oe9vf
    @oximas-oe9vf Год назад +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 Год назад

    شكرا