Creating Input Fields With TKinter - Python Tkinter GUI Tutorial #4

Поделиться
HTML-код
  • Опубликовано: 15 янв 2019
  • How to Create Input Fields With TKinter and Python. In this video I'll show you how to create input fields using the entry widget in tKinter.
    In this series I'll show you how to create graphical user interfaces for Python with Tkinter. TKinter comes with Python already, so there's nothing to install!
    ✅ Watch The Other Videos In This Python Playlist:
    bit.ly/2UFLKgj
    ▶️ See More At:
    Codemy.com
    ✅ Join My Facebook Group:
    bit.ly/2GFmOBz
    ✅ Subscribe To My RUclips Channel:
    bit.ly/2IGzvOR
    ▶️ Learn to Code at Codemy.com
    Take $22 off with coupon code: youtube

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

  • @Codemycom
    @Codemycom  4 года назад +12

    ▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My RUclips Channel:
    bit.ly/2UFLKgj bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN

  • @9696viktor
    @9696viktor 4 года назад +183

    Never thought that Walter White will teach me Python Tkinter. Thank you!

    • @Codemycom
      @Codemycom  4 года назад +22

      Ha!

    • @benedeknagy2117
      @benedeknagy2117 3 года назад +9

      You're Goddamn right!

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

      Well, yes! I thought the man in the thumbnail is Mr.White. Haha..😅😅😅

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

      Yes, Walter White that hadn't choose the wrong path.

    • @screbulous
      @screbulous 2 года назад +9

      JESSE WE NEED TO CODE

  • @sannihith4204
    @sannihith4204 3 года назад +47

    Most people tries to make small series and skips many parts but you really said everything in detail in a way that even beginners can understand easily great man. I'm gonna recommend your videos to everyone. I wish i had seen these before.

  • @Ice-on7xs
    @Ice-on7xs 2 года назад +1

    I just searched input tkinter for my Jarvis program (switching GUI's) thank you.for that fantastic explenation

  • @rishikeshpant3060
    @rishikeshpant3060 4 года назад +5

    You are a great instructor and your sense of humor shows that you are a very friendly person.

  • @TheLegedaryDogo
    @TheLegedaryDogo 4 года назад +10

    i'm just trying to make a program in 3 days , out of time , without any help , i found this channel and this playlist SAVED ME A LOT ! Thank you very much

  • @kennethjoshuvasamuel
    @kennethjoshuvasamuel 3 года назад +15

    I love the way he says "Very cheap" for his package

    • @Codemycom
      @Codemycom  3 года назад +5

      ha

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

      @@krypton1142 do you mean it worths more or less?

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

    you are the best teacher which I found on youtube.
    Because of like u people the poor people's children also learn like rich peoples children and becomes a shining star for their society.
    Thanks, big FAN.

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

      Thanks for watching!

  • @juandavidsanchez4091
    @juandavidsanchez4091 4 года назад +10

    This channel is criminally underrated

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

      I heat that! Tell your friends ;-)

  • @sreeharieditography6711
    @sreeharieditography6711 3 года назад +2

    Ohh maan!! Its the best ever tutorial for Python I have ever watched.You are just awesome sir, explaining a big programming language just like a piece of cake.

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

      Thank you! Glad you like them!

  • @vignesh8616
    @vignesh8616 3 года назад +30

    This is one of the best Tutorials...I'm gonna recommend this channel to all my friends...thanks for those amazing lectures sir 🙌

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

    thank you so much! I really like your channel and easy to learn code's logic with your narration.

  • @kurtthorsten4463
    @kurtthorsten4463 3 года назад +5

    Hello John, I really have to thank you for this tutorial series. Most of the videos I watched were in german but you make it so clear, that I can follow along.
    The way you explain things is very concise and still you have time to show some alternatives, which really gives the viewer a good picture about what tkinter and python has to offer. Liked and subscribed!

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

      German? None of my videos are in German, but glad you liked them!

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

      @@Codemycom Hello. I meant I watched only german tutorials from other youtubers, but you make it so clear that I can watch your videos even though they are in english.

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

    Great job deserving of thanks
    عمل رائع يستحق الشكر

  • @sultonmurodrajabov8284
    @sultonmurodrajabov8284 3 года назад +2

    Really helpful and easy to follow for beginners. Great!

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

      Glad you're enjoying it!

  • @MohamedAmr-gx7vi
    @MohamedAmr-gx7vi 4 года назад +3

    Thanks, man
    Your tutorials helped a lot

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

      Sure thing, glad you liked them!

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

    You are the best youtuber for gui dev in python with clear explanation ❤

  • @buildworldswithme
    @buildworldswithme 3 года назад +6

    From now on I will try to refer to concatenating things together by "smush"! That sounds way more entertaining. Thanks for all your videos!

    • @Codemycom
      @Codemycom  3 года назад +2

      everyone loves a good smush lol

  • @Leojoselima
    @Leojoselima 4 месяца назад

    Tudo muito bem explicado, obrigado!!!!!!!!!!!!!!!

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

    amazing videos, and very clear explanations! Thanks for sharing your experience with us.

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

    Hello Mr from Cyprus!
    Excellent work!
    I am going to recommend your videos to my students.
    Thanks a lot!

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

      Thank you! I appreciate it!

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

    This tutorials are gonna help me a lot in my journey. Thank You Heisenberg🧠🙏🙏🙏

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

    Thanks for the videos it is really simple to understand,than the other channels I watched. Keep rocking 😊😄.

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

      Glad you liked it!

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

    Hello John. I love the way you, step by step, are introducing elements of Tkinter. I closely follow your instructions and try to make small Tkinter programs in Thonny. Just to practice, practice and practice. And you know : Practice makes Perfect :)))

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

    thank you very much.This course about tkinter is very useful

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

    What else can i say... thank you soooooo much. you the man.

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

    Thank you so much thanks to you I was able to learn Tkinter in 6 hours enough to do my final project.

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

    Great videos, I'm learning a lot!

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

      Thanks! I'm glad you're enjoying them!

  • @akramnarejo6221
    @akramnarejo6221 5 лет назад

    you are a hero man really such a great explanation👍

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

    Exactly what i was looking for

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

    thank you so much! its great

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

      Glad you enjoyed it!

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

    Thanks a lot, and I must say you are really amazing dude!

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

    The way of teaching is really fantastic

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

    Thanks sir, really superb👍👍👍

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

      Thanks for watching!

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

    Thank you so much for this highly helpful video:)

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

      Glad you enjoyed it!

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

    Thank you for teaching python Tkinter

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

    smashed the like button. It was consensual.

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

    thank you for everything 💚💚💙💙from EGYPT

  • @1aadithya9c25
    @1aadithya9c25 3 года назад

    i understood really well

  • @raniduharshana5238
    @raniduharshana5238 4 года назад +5

    Thank you very much. I learnt a lot about tkinter. 🤭❤️

  • @user-ou7jn4eb1z
    @user-ou7jn4eb1z 5 лет назад

    I very like this series video.

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

    Nice content over here! Liking it

  • @mbn-code
    @mbn-code 3 года назад +1

    i defenetly smashed the like and subscribed you help me alot with my python

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

    Awesome tutorial ,Thanks

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

      Glad you enjoyed it!

  • @premu1981
    @premu1981 4 года назад +12

    It's great information for the user like me. How can we make any entry mandatory in tkinter in a survey.

  • @user-ik2pj7ch1n
    @user-ik2pj7ch1n 2 года назад

    Great work thanks a lot

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

      Thanks for watching!

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

    Thanks a lot!!!

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

    Great' i am learning a lot

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

    Love from India 😌😌😌

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

    cool, I love input fields.

  • @ImranHossain-uk6yx
    @ImranHossain-uk6yx Месяц назад

    It was really helpful of me 😊.

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

    Thank you very much!!!!

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

    thank u ,making sense

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

    You’re the best 🎉

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

    This is one of the most underrated video on youtube

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

      thanks! tell your friends ;-)

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

    Very cool video!!

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

    Thank you so much bro

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

    Lesson check. Thanks.

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

    Thank you! it's really useful series of videos. helped me a lot

  • @Christine-ne3dw
    @Christine-ne3dw 3 года назад

    Thanks for the vid

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

    Thank You!!!

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

    I love it.

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

    thanks man!

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

    Thanks mate

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

    THIS HELPS

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

    The man!

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

    Excelent thankyou

  • @user-wh2dp3kc4e
    @user-wh2dp3kc4e 6 месяцев назад

    thanks you are awesome

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

    I will recommend your channel for everyone who ask 💙💚💙💚

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

      Thanks! I appreciate that!

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

    Thank you

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

    Can you pls do a video on how to use tkinter with smtplib that would be really helpful and by the way amazing helpful video loved it!!

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

    Awesome

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

    very cool

  • @borgyoh
    @borgyoh 5 лет назад

    good tutorial

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

    damn good man

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

    I am a noob at tkinter thank you soo much for starting with the basics😇😇

  • @PavanKumar-jt5mq
    @PavanKumar-jt5mq 4 года назад +2

    I am bored due to the lockdown and I hope I will be busy watching these tutorials :)

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

    excellent explanation. I wish you also do something on ML.

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

    super

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

    Thats dude.

  • @HugoCervantes-HARO
    @HugoCervantes-HARO 2 года назад +1

    Great work John, thanks! Where can I find your books and other materials we get in case we suscribe?

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

      You get those in the website when you subscribe

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

    Oh my god, thank you god bless you!!!
    i was looking for a way i can enter my name in a input box and so when i press a button it saves the entered name to that .txt file, it took me like a half year(with no results) thank you!!
    btw... I subscribed ;)
    -My english is not perfect but i hope you understood.

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

      Glad I could help!

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

      Ohhh great!!! File handling is awesome 😇😇😇

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

      @@tapeshvashisth7726 ha

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

      @@tapeshvashisth7726 Yeah i understand file handling really good when it comes to Python but that was the first time(yesterday) that i had to open, safe etc in tkinter.

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

      @@holycow4889 I also have deep understanding with file handling 😅 I have made some projects on it for my school😊

  • @suhud-al-yeqeen
    @suhud-al-yeqeen Год назад

    I just sabotaged my laptop smashing the like button

  • @cmputerprgrammer7800
    @cmputerprgrammer7800 3 года назад +5

    Sir I request you to please teach us how to add rounded entry fields in tkinter.

  • @scoopedcontent
    @scoopedcontent 3 года назад +9

    7:42 you know you're a programmer when start your count by 0

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

    I did the same thing as you and I want to save the input into a variable. But e.get() only takes "Enter your name: " from the e.insert(0, "Enter Your Name: ") instruction. What should I do to save the name I am entering in the box to a variable, because name = e.get() gives me just the text "Enter Your Name"?

  • @whitebird365
    @whitebird365 5 лет назад +1

    Thank you for the video..
    Can we make an input with a specific choices? For example an input that has two choices (male and female).

    • @Codemycom
      @Codemycom  5 лет назад +2

      Do you mean a drop down box? Sure...I'll cover that soon.

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

      @@Codemycom will it be better to achieve this task by radio widget.

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

      @@attaulmomin better is a relative term

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

      @@Codemycom yep.

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

    Hello, how do you verify if the input field is empty or with some character? , condition of not letting you go to the other Entry if the input field does not have a letter . Similar to google form (fill in a required input field)

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

    Great series. I am watching now and doing everything step by step. Thanks so much. Just was surprised, why doesn't work 'height'? I can give for Entry just width, but no height. And font size doesn't work for me ! Do I need to install something extra???

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

      There is no height attribute, but font will work. You likely have a typo.

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

    how can i make the user to enter only a specific type on input i.e. INTEGER input or str

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

      use an if statement to test if the input is an Integer, thru a warning if it is not

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

      @@Codemycom thanks.Sir

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

    Hey, please say how to do the below things. I need the below in my programs.
    How to make number only text boxes? How to make text only text boxes? and finally how to limit characters in text boxes?

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

      Pretty sure to limit characters in text boxes you can set them to a specific width and that prevents more than the widths worth of characters from being entered

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

    THANKS FOR THE EPIC!!! SUPER HELPFUL!!!! AMAZING!!!!!! VIDEOSSSSSSSSSSSSSSSSS!!!!!!!!!?!?!??!?!?!?!?!?!?!

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

    Do you know how to store that into a variable?
    I`d like to create a Login and Password pop-up for users. You code helped me to get the logic behind it, but I`m not sure how to save that.

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

      Save it to what?

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

      Sorry I did not make myself clear. What I mean is, I'd like to store the input into a variable.
      I discovered how to after a little search.
      Btw, nice channel.

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

      var = e.get()

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

    Thank you for the tutorials. Just a question sir in this video, how to not duplicate the label that is being displayed? I'm thinking of just updating it instead of having a flood of labels?

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

      you can use .config(text="whatever) on a label to update it.

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

      @@Codemycom Thank you very much sir, I wasn't expecting a quick reply like that. It's a great help.

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

      @@carljeffreyaustria486 Happy to help :-)

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

      @@Codemycom Sir, referring from this video, should I put it under def myClick(): to make it update every time I push the button?

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

      @@carljeffreyaustria486 Do whatever you like...try it and see.

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

    Can we use placeholder in input field just like html form ? Thanks for this amazing video

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

      you can .set() them.. so if it's called e: e.set(0, "whatever you want as placeholder text")
      the 0 is the position in the entry box where you want to put the text.

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

      @@Codemycom this does not work:
      AttributeError: 'Entry' object has no attribute 'set'

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

      @@usmaankhawaja1612 you need parenthesis... set.()

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

    Hi, I'm fairly new with this but I was trying to put an auto clicker into a CustomTKinter GUI. I was wondering if there would be a way to have it expect the user to input a float rather than a string into the entry?

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

      Not sure what you mean...you can convert any number to float using regular python.

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

    while I am watching this, breaking bad is running inside my head :)

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

    Is it Possible to pass a function with arguments in the command argument for a widget like a button etc.?
    Thank You, Sir, I could discover Tkinkter easily after such a great video s provided by you,sir

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

      Yes, absolutely. instead of command=thing(argument), use:
      command=lambda: thing(argument)

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

      @@Codemycom Thank you, sir.

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

      @@rahularanger407 sure thing

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

    you explain everthing crearly I learned a lot ! but I have a qestion
    I typed text on Text widget(my input) so how can I displey it on another Text widget (my output) ?
    I use get(‘1.0’ , ‘end’) function but it didn’t work

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

      my_output = Label(root, text=my_input.get())

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

      Codemy.com thank you ! it’s work 💕

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

      @@Se_1364 Good :-)

  • @aliceanderson5154
    @aliceanderson5154 3 года назад +2

    I want a tkinter reference table. i.e. All of the methods and configurations for EVERY widget as well as ALL of the options for pack and grid. I can't find this or anything like it anywhere. Can Anyone here point me to an example?