This was a very helpful introduction for tkinter. Here are some things I discovered while fiddling around: - Button(window, text=" ", width=0) a width of zero will automatically size the button to fit the number of characters in text=" " so it will always be large enough if it says "Submit" or "Submitttttttttttttttttttttttttttttt" - in the definition for click(), comment out #output.delete(0.0, END). Now the text will stay in the output box when click submit. Now go to output = Text() and change wrap=WORD to wrap=CHAR and click the submit button a few times. You can see how words are treated when they reach the edge of the line in the output box. - under window= Tk() type in window2= Tk(). Now for the output box, change output = Text(window) to output = Text(window2) but leave everything else as is. This will open a separate window for the output box, when you click submit the in one window, the output will display in the second window.
@nanaabenanyamekye97085 жыл бұрын
Your comments are very helpful. Thanks
@nihaalxc96073 жыл бұрын
I know its been over an year, but why put width=0, just dont put width at all, itll resize automatically. Do not use two Tk() as it will lead to many other issues if you don't handle it well
@mews752 жыл бұрын
Haha good job. Just don't use two Tk() without handling it properly
@rattatteb5 жыл бұрын
If you want to learn it even faster than 20 minutes put the video on 1.25/1.5 speed
@AhcMeUk5 жыл бұрын
Hahahaha good tip to save time.
@barkeeper78875 жыл бұрын
1.25 is best
@cavidmirzyev38665 жыл бұрын
actually i'm doing this for a while and it's very useful.
@omiorahman62835 жыл бұрын
Lol true
@shubhamsalgaonkar21565 жыл бұрын
did the same... (1.5x)
@namnenergy65145 жыл бұрын
I love how you periodically check your work by running the program. Certain other unmentionables on KZbin do not do this and their code ends up with obvious errors. Kudos
@thatsme12682 жыл бұрын
At 61 years old I needed something like this to help me understand the Raspberry Pi GUI and to get me started on my way to develop my visual outputs instead of just using console applications . Too many videos on uTube forget that yes there are users out there who have maybe (later in life) made the transition away from Microsoft's visual environment (after 20 years) to Python. Also, other 'authors' either don't provide any commentary (but substitute it with irritating canned music), speak too fast and really do not explain exactly what they are doing, provide far too complex examples or don't run their efforts to show outputs. Many thanks for this video found "by chance" and I have subscribed now. Hopefully I will be able to find your other video on exact placement of graphical elements?
@stephenmoran26434 жыл бұрын
Ty for the quick tutorial. Gave me enough info to play around and study. Starting learning how to code from square 1 about 2 months ago. I wrote all my backend code and now it's time to build a gui around it.
@Circuit_Whisperer5 жыл бұрын
I have been trying to learn TK for a couple days now, and your tutorial made more progress in my studies than I could ever hope to do on my own!
@Tovin7 жыл бұрын
This is great! While not how my teacher went on to teach it, this is what it took for me to really understand and get into tkinter! Thank you so much!
@rivermishow46786 жыл бұрын
Thank you so much for this tutorial! It was informative, easy to understand, and kept the lesson from feeling at all overwhelming!
@maxniemi45842 жыл бұрын
btw, you can put quotation marks around the "click" in command=click to make it work without defining a function. However you can't make a lot of the other stuff
@BashGraphics4 жыл бұрын
best video ever on Python GUI.. I created a GUI software for BMI Calculator using your technique..
@adarshtiwari73954 жыл бұрын
Probably the most easiest and effective explanation for GUI out there. Thank you👍🍻
@AhcMeUk4 жыл бұрын
Glad it was helpful!
@jaketrap Жыл бұрын
You killed it. I’ve been trying to get into this for a long time
@matthewamstutz88895 жыл бұрын
If anyone is having problems getting your image to come up or having problems importing tkinter, import like this (without quotes) "import tkinter" (NOTE: for python < 3 use import Tkinter [might work the way his is but mine is 3 and i had problems with it] if you have python >= 3 use "import tkinter") for python3 they changed a few things. The image had to be declared like this for me (without quotes) " photo1 = tkinter.PhotoImage(file="File Path Here [i.e /home/your username/Downloads/file_name.gif) Label also had to had to be used by " tkinter.Label(arguments) Good video though, this guy simplifies it pretty well, I was on a video yesterday and the dude was importing PIL and making classes and such. He was flying through pretty quick, got from class declaration of the window all the way to declaring the functions for the buttons without really explaining what was happening.
@waitesdennis4 жыл бұрын
This has been such a help to me! I've just created something for work that has saved me so much time! Granted i didnt really need a GUI but it looks good and is helpful for my colleagues that don't know how to use python. Keep up the great work.
@AhcMeUk4 жыл бұрын
Wonderful!
@VivekKumar-mi3fh6 жыл бұрын
Thanks! It’s helped me to learn in less time. Request you to add your code in description section. It will be helpful for practice. If possible please add some project. It will help beginners like me to get confidence in python programming.
@leobone38105 жыл бұрын
Thank You. I got Computer Science for a GCSE and have been interested in the non-modular section of Python, but never really studied TKinter. :)
@ziomekziomutek44912 жыл бұрын
watching in 2021 and everything still works, thanks for help man
@abianchi02265 жыл бұрын
Very clear explanation. Love the British accent!
@omiorahman62835 жыл бұрын
me 2
@frankarkwright19774 жыл бұрын
Hi, Thanks a very good tutorial. I taught ICT for over 20 years, and I think the level of description was just right. Sometimes teachers can explain too many things that get in the way.
@irvpaton86262 жыл бұрын
This is as good as it gets. You make this complex subject very approachable.
@jozbornn4 жыл бұрын
This was exactly the crash course I needed. Thanks so much for putting this video together!
@msctube454 жыл бұрын
This video was outstanding in the organization of the tutorial and in the clear explanation of the substance. Great job!
@shruto1183 жыл бұрын
if you want to resize the text box in python i recommend doing (if py true == pc + big + window)
@tjb31717 ай бұрын
finally, someone who goes through this in less than a million hours!!
@CornyFlakez6 жыл бұрын
2:22 how does tkinter know where the gif is? Does it have to be in a specified directory? Sorry, I'm new...
@AhcMeUk6 жыл бұрын
Make sure it is in the same folder as your.. Py file
@saatvikgupta_02083 жыл бұрын
We can use the PyDictionary module in it to create a real working dictionary rather than typing ourselves though it would require an internet connection to work.
@opie329587 жыл бұрын
Great job. I could tell you knew exactly what you were going to do before you even started recording. I hate when someone gets five minutes into a video and then says, "Oh wait, that example won't work, let me start over."
@donbrandon27345 жыл бұрын
Thanks for this. This gives a good view of how the framework of the tkinter module works. I think I can read the directory and figure the rest out from there.
@tobiaskarl49395 жыл бұрын
Very amazing tut. Thx. Very good. As english non-native speaker/listener it takes a little time to guess what you did say. Look this video with english auto subtitles on and you see what I mean. Google also has problems to understand ... you say "blaaee" and you mean "bluuuuu" for blue But at the end I understand all ... but is a challenge ... lol
@omiorahman62835 жыл бұрын
yeah that happens Different accents and all
@davidtrimbee20165 жыл бұрын
Very well done, love the pace of the work. Gives me a great start.
@apoorvxx5 жыл бұрын
Well you made it look way easy. I mean it is easy to create all those labels and button but the explanation will help in executing the code through the gui. This was good :)
@CeeTee4694 жыл бұрын
Nice pace. One of the few coding videos i like. Send the link for the code.
@christianconsen37596 жыл бұрын
Helped me understand Tkinter a lot better. Thank you! :)
@MrBubbagump585 жыл бұрын
I'm grabbing the concept of Tkinter programming pretty well. What I haven't run across yet, is a good reference for all the methods and attributes, particularly of class Tk(), but, for the widgets as well.
@WisdomofHal5 жыл бұрын
You may want to go read up on the documentation you can go to the python website, or dozens of other documentation websites
@markday96204 жыл бұрын
Excellent presentation. One of the best that I have watched!
@par-th14 жыл бұрын
You can also use expand = True so the text will expand
@o1techacademy4 жыл бұрын
I learned a lot from this tutorial. Thank you very much.
@evofoxxx24776 жыл бұрын
Thanks a lot! Your video really helped me with Tkinter, which I didn't really understand before! Keep up the good work!
@amiraliqadri5 жыл бұрын
What is it with your icon
@daziwg4564 жыл бұрын
By far the best descriptive video I've watched on Tkinter , I had my Window up and running in 20 mins after watching this , awesome job , quick question though ..how would you put 2 data entry points on the same line with a ":" in between them ??
@Sebastian-42-692 жыл бұрын
This is really great! You're great at explaining and the tutorial is very efficient! I enjoyed the tutorial!
@RAHULNAIK034 жыл бұрын
Very well explained.. thanks for this video..
@lenael47474 жыл бұрын
I love the way you explained. it is way too convenient for me. thanks for the video ^ ^
@omiorahman62835 жыл бұрын
Not all heroes wear capes
@thezerocool226 жыл бұрын
great straight to the point tutorial, I think I can use this as a teaching resource for pupils. I found the zooming on the code annoying, and it would be really useful to have a bit.ly link to the source code for a cheeky C&P, even if its just the starter pseudocode comments, that might increase engagement.
@omiorahman62835 жыл бұрын
thats the same reason i like it
@smeetnilvarna6 жыл бұрын
This was a great video sir ! Was looking for a video like this from very long ! Thank you so much !
@hbade40203 жыл бұрын
Thanks for this! Is there any documentation with all the class attributes and methods? Cheers
@erikekelund34286 жыл бұрын
I can't seem to add any picture or even change the color of the background. Checked the code 100 times, there's no difference between yours and mine. Could it be somthing under the hood?
@jcsmith95184 жыл бұрын
This was good and reminded me of HTML syntax I've used to specify windows, ect. Thank you!
@matthewfelgate3 жыл бұрын
Thanks for the introduction to TKinter.
@Gladiator-wy5qb4 жыл бұрын
Great tutorial... Nothing better than this 😁😁😁
@rishabhsagarmagics4 жыл бұрын
Nice thanks good learning video....
@Abdul-Farooq3 жыл бұрын
This was amazing, pleas tech more about tkinter😇😇
@TheStarCycle6 жыл бұрын
Very simply explained - perfect for what I was looking for, thanks!
@MrStudent19786 жыл бұрын
Very nice! Thank you very much for sharing such a video....your style is really nice!
@chisomodimmegwa34794 жыл бұрын
EXCELLENT TUTORIAL!
@zafarhzhzhz28735 жыл бұрын
very nice tutorial
@a2mmagna9495 жыл бұрын
Mr Zamans Class is amazing with this guy involved
@johnhutchinson94457 жыл бұрын
This is concise & well thought out, thank you so much for this tutorial. I'm trying to work out how to get the user to add new words and definitions to the glossary. Do you have any ideas for how this could be done?
@dp08136 жыл бұрын
The PhotoImage class can read GIF and PGM/PPM images from files. To read other formats, you need to import the Python Image Library (PIL) and use that to convert images to a format Tkinter can handle. Example from effbot.org/tkinterbook/photoimage.htm: from PIL import Image, ImageTk image = Image.open("lenna.jpg") photo = ImageTk.PhotoImage(image)
@robinrochan93014 жыл бұрын
thank you very interesting
@big_cheese21624 жыл бұрын
Great tutorial, thank you very much
@AhcMeUk4 жыл бұрын
You are welcome!
@kelvinchikezie93704 жыл бұрын
This is some teaching yah! Thanks mate. I gained some clarity
@orionconner006 жыл бұрын
simple yet informative....good work
@harrysstuff2475 жыл бұрын
Seriously, thanks for this video, helped me a lot!
@BloxsterClips2 жыл бұрын
How do you get images to overlap? It only snaps to place for me.
@playervsk5 жыл бұрын
thanks! I try to develop OS! This video was VERY useful!!!!
@movielover77956 жыл бұрын
good job! learnt alot from this maybe you should start doing programming tutorials except python of course
@AhcMeUk6 жыл бұрын
What sort of vids would you like?
@husseinabukar70813 жыл бұрын
Thanks and good work for your dedications, I would say if you could link your code it will be very helpful.
@cafeespresso993 жыл бұрын
Thank you, this is useful. I'm new to Python (strong background in VBA) and currently trying to decide whether to dive straight into PyQt, or to start with Tkinter and then move onto PyQt. Tkinter seems easier to use, but perhaps not as rich in widgets, so I'm tempted to start with Tkinter until I outgrow it. Has anyone else had the same decision to make and do you have any advice/comments? Thanks.
@jesuisravi2 жыл бұрын
Very nice. Is this dictionary infinitely expandable?
@LorenzWittenberg5 жыл бұрын
Nice introduction to tkinter! Thanks man!
@mathhubnigeria40724 жыл бұрын
great videos
@CarlFritz243 жыл бұрын
Good. Better over all... give us the code in the description window of yours. Then we could run it and see if everything is alright in our computer. Really good it would be.
@AhcMeUk3 жыл бұрын
Code it and you learn more....
@aftabuddinahmed91013 жыл бұрын
You are a legend (I am not asking I am telling)
@benjamincalloway2 жыл бұрын
4:30 In latest version of python (as of sep 2022), it should be 'sticky="W"', instead of 'sticky=W'. Else it throws a NameError
@HassanTofaha6 жыл бұрын
you are very organised teacher, thanks
@joshheim85996 жыл бұрын
Great tutorial! Thanks!
@goat863 жыл бұрын
Thank you so much 🙏
@ludwighurtado17195 жыл бұрын
Great Video Thank You So Much !!!!
@goldengameplay29443 жыл бұрын
Amazing tutorial 10/10
@prjwl17 жыл бұрын
Thank you very much for the excellent tutorial
@vircycure6 жыл бұрын
Awesome teaching sir... Thank you
@EverythingRox4 жыл бұрын
How to switch to different pages if I click a button. For Example if I click 'about us' I want another page to open in the same window. If u cud link the video, or tell me it would be of great help. Awesome tutorials btw.
@superumesh7776 жыл бұрын
helpful straight to the point
@joudialmanei97294 жыл бұрын
What's the visualizer you're using?
@ziasabri20033 жыл бұрын
where shall we add the photo file .to open it with the tKinter.Should we add it in the folder where the file of python is.
@roubarizkallah21723 жыл бұрын
Yes
@steviecb7 жыл бұрын
Hey great job! Easy to follow. I recommend watching thenewboston then this video to understand the syntax of tkinter better :). Great video tho
@anshumans11746 жыл бұрын
I downloaded a gif image and it does not show on the screen. I get an error saying that there is no such file or directory. All the syntax is correct. Any help? edit: I saw Daniel G's comment earlier. I do not know how to move the gif file to the same folder my python file is in. I am using pycharm with python 3.6. edit: I figured it out :) Thanks for the great tutorial.
@AhcMeUk6 жыл бұрын
Glad you solved it.
@uniquefirearmsolutions35645 жыл бұрын
@@AhcMeUk I cant get the image to show up, I have a .gif, and it is saved in the same folder as the program??
@zoltantoth60154 жыл бұрын
@@uniquefirearmsolutions3564 same is not working for me
@danrobert72412 жыл бұрын
You might consider editing the audio. It's very quiet on some systems.
@collinsacheampong26732 жыл бұрын
thanks very much bro...
@pedritomanuelroque4 жыл бұрын
How can I convert that script into .exe so I can install it in another PC and others can use it??
@elenagjevukaj12146 жыл бұрын
Excellent work! Thank you :)
@kennethpiguez4493 жыл бұрын
🙏
@mr.bowtie23093 жыл бұрын
.get doesn’t work, How can I fix it?
@GaneshPatil-vtox6 жыл бұрын
Thanks brother
@HIDlarissaTERRY4 жыл бұрын
interesting, thank you so much....love the clear talking ;)
@ryanbarrera25955 жыл бұрын
This is great...Thank you for sharing your knowledge..
@abisarwan202 жыл бұрын
thank you so much 😊
@sourabh3593 жыл бұрын
Very useful and user friendly!! 😁😊
@albertodearte4 жыл бұрын
Thanks! I was looking for something like this for a long time... It would be nice if your can transform this example in a chatbot with some intelligence to it. There are many things to do
@funnyanimalworld75794 жыл бұрын
After this video you know tkinter.try making list of 30 questions and asign each question 5 radio buttons then print answers into a file if you cand do this kind of gui then yes you learned tkinter in 20min