Learn to Program 20 : TkInter Tutorial

Code & Transcript :

Best Python Book :

Support me on Patreon :

Interactive Tutorial :

In this part of my Learn to Program series I’ll start a multi-part tutorial on developing GUI interfaces with TkInter and Python. We’ll look at root, Ttk, Button, Entry, Label, Frame, Checkbutton, TkInter Event Handling, mainLoop(), StringVar, the Pack Geometry Manager, the Grid Geometry Manager and more.

If you missed any of the previous videos, the series starts here :

Thank you to Patreon supports like the following for helping me make this video







23 responses to “Learn to Program 20 : TkInter Tutorial”

  1. Paavan Gupta Avatar

    Sir, why you have given 0 before sum in sumEntry = insert(0, sum)
    and also "<Button-1>" in equalButton.bind("<Button-1">, get_sum)

  2. Paavan Gupta Avatar

    Sir, why you have not used the StringVar() function. Is it a predefined function??

  3. Crap sTAiN Avatar

    Dude you move way too fast and you never stop to explain anything. Your just going through the whole GUI coding but not actually explaining how to use it

  4. CrazySkullGamer Avatar

    Gooey? Never heard of that term

  5. Romy Kim Avatar

    Got a dumb question at 23:20 When you call the get_sum function, why isn't it get_sum() ?
    I'm still confused and unclear about decorators. Does this have to do with it at all ?
    Everything else felt like html with different terms. Thanks.

  6. John carson zangor Avatar

    Derek, If it wasn't for you, I would not have learned how to program, I always said it, I think you created more programmers than MIT, thanks for everything dude.

  7. Thomas Erickson Avatar

    Oh! a second question: Generally, about modules such as tkinter, how do I learn: 1) what is in an module (ie. what functions exist, necessary syntax, etc), and 2) what modules exist? I presume I can google tkinter and find specs, but how can I learn what libraries (modules?) exist? is there a good central info repository for this knowledge? I don't know anything about what lies beneath the python surface, and really wish to know! thanks again!

  8. Thomas Erickson Avatar

    Hi Derek, I'm loving this series, and THANK YOU for being so generous with your time, efforts, and knowledge. I have a question about the import request used here for tkinter, because you (and others I have seen) wrote " from tkinter import *" as opposed to "import tkinter" (actually, I guess you wrote both ways). Is there any particular reason for this difference? does it create a difference in the way the python interpreter uses tkinter? or is this simply a synonymous way to call the whole library? Thanks!

  9. Jake Krolak Avatar

    Getting an attribute error:
    tkinter has no attribute '_test

    This is on Python 3.6, anyone else with similar issues?'

  10. John Dunbar Avatar

    On the first line, why doesnt ttk get imported by the import *?

  11. keeler1160 Avatar

    What is root and what are the different colors in the texts?

  12. Omar kyon Avatar

    I am impressed by all the work you put into this judging by the video and the description. I will surely become your patreon once I get a job.

  13. Cody Davis Avatar

    wish you would have told us what to do if tkinter WASNT working properly instead of assuming it does.

  14. Mathys Taljaard Avatar

    I followed other tutorials that told me to import the "ttk" module using this statement to: "from tkinter import ttk", however every time i try to import the "ttk" module, i get an error message that says: "unresolved reference: ttk", how do i solve this problem? the IDE i use is PyCharm community edition 2017.1.5, the python version i use is 2.7

  15. Caleb Hille Avatar

    this is the best tkinter tutorial in terms of explainations and examples i could find out there.. bucky and sentdex are good but like this guy feels like a real computer scientist.. i finally got why its called tkinter from the way he pronounces T.K.inter.. so cool good good video. new subscriber..

    all hail Derek Banas

  16. GamersGotPower Avatar

    sublime if so what theme did you use

  17. Harold Thibault Avatar

    At 6.07, I'm getting NameError: name 'Frame' is not defined. Same for StringVar, Label, and Button.
    I'm on a Raspberry pi.

  18. Parafian12 Avatar

    What is the difference when I put my label/button to root instead to frame? I did both and it seems to look and work the same way.

  19. Parafian12 Avatar

    the program says : Cannot import ttk
    please help

  20. yaswanth pushpak Avatar

    Can tkinter be used in python 2.7?

  21. manish adwani Avatar

    hey Derek I got tkinter but I'm pretty sure that big companies don't use tkinter to make their apps then how do they do it and if they use something like VB then do they connect their app to their Python servers

Leave a Reply

Your email address will not be published. Required fields are marked *