Start learning Software Development today and make upwards of $100k+! techwithtim.net/dev I have a FREE intro course that walks you through the exact steps and topics you NEED to learn!
your videos are the best on RUclips you don't just say what to do, you actually explain everything and understand what your working with i really appreciate the content.
This is awesome! I plan to incorporate a text editor into my game engine, and this is a great logic guide! I'll probably use OpenGL or Qt instead of TKinter, and write it in C++, but this is a great start!
it's so crazy, I literally was looking into a project like this, like yesterday, I was using chat GPT to step through some of the reasoning but it makes me feel like I'm in the truman show fr
How to distribute this app to anyone who does not have python installed? When compiled to.exe the file gets detected as malware and no-one can open it.
Hello Tim! It's been a while that I'd checked your channel. I should say you aged a bit and turned into a young handsome man. Keep up the good work buddy!
🎯 Key Takeaways for quick navigation: 00:14 📜 *Introduction to Python text editor project* - Introduction to a Python text editor project using Tkinter. - Mention of the project's suitability for beginner or intermediate programmers. - A brief mention of a related course. 01:13 🌐 *Credit to the source of the project idea and code* - Credit given to a blog as the source of the project idea and some code. - Reference to potential future video projects based on blog ideas. 02:10 🖼️ *Introduction to Tkinter and its capabilities* - Explanation of Tkinter as a graphics library for creating user interfaces. - Mention of the grid layout system in Tkinter. - Reference to the creation of a basic user interface. 03:10 🪄 *Creating a main function and the Tkinter window* - Creation of a main function for Tkinter code. - Setting up and displaying the Tkinter window. - Explanation of the main loop to keep the window active. 04:36 📐 *Configuring window size and layout* - Setting the title and size of the Tkinter window. - Introduction to grid layout and its usage. - Adjustment of row and column sizes within the grid. 06:34 📊 *Creating and configuring widgets* - Introduction to creating text editing components (widgets). - Explanation of widget placement within the grid layout. - Setting widget attributes such as font and size. 08:34 🎨 *Styling and positioning buttons within a frame* - Introduction to creating buttons and using frames in Tkinter. - Styling buttons with padding and expanding them horizontally. - Proper placement of buttons using grid within the frame. 11:36 🖥️ *Adding functionality to buttons* - Introduction to adding command functions to buttons. - Creating functions for opening and saving files. - Reading and inserting file contents into the text editing component. 17:42 📝 *Changing the window title* - Dynamically updating the window title to reflect the opened file. - Showing the file path and action in the window title. 18:43 📝 *Lambda function for calling another function,* - Lambda functions are anonymous functions used to write functions in one line. - Demonstrates how to create a lambda function to call another function with specific arguments. 19:13 📝 *Opening and loading a file,* - Shows how to open a file and load its contents into the text editor component. 19:44 📝 *Saving a file,* - Explains how to save the contents of the text editor component to a file. 20:44 📝 *Adding keyboard shortcuts,* - Demonstrates how to add keyboard shortcuts (Control+S and Control+O) to trigger save and open file commands. Made with HARPA AI
I am having a problem. When i do the save button like i did the open button with the lamda stuff and everything like as you showed. and how its very similar to the open button. How is it that the Open button is working correctly, but I try to use the save button and i keep getting this error? "TypeError: save_file() takes 0 positional arguments but 2 were given". I mean I even used lambda like I did with the open button because I know you said you needed it to be able to do that. But why does the save one come up with this and the open one doesn't?
@@hürriyetpalestine you are right. That's it right there. How did I miss that. When I looked it was an empty section. It said "save_file():" when I looked. Got that fixed.
@@shawn445 first time I've heard it pronounced like this. Then again, I've been doing this a while now, so I knew that Tk was a widget library, originally written for the Tcl programming language, but with many bindings to other languages, one of which being Python. So seeing the name Tkinter it was obvious that it should be pronounced Tk Inter as it is simply a python library for creating graphical user interfaces with the use of the Tk GUI toolkit. Not only is it for creating GUInterfaces, it is a binding to Tk, basically an interface between Python and Tk, hence Tkinter.
@@mileswilliams527 I understand that, but just like so many other things, how it is pronounced and what it was supposed to be are two different things.
i thought about making a text editor before and me before using my tiny brain thing that i need to use pygame that only does graphic for me and i need to create a whole new text system, i can't belive that i never thought of use tkinter. anyway nice video i liked it and i did the project.
Why does tkinter feel like cheating and also I don’t understand why we need to lambda another function we’re calling anyway it’s the same for tic tax toe it makes hella confusing
he explained it, though not in depth. If you 'call the function directly' when you assign it to command, the function will be called right away when the program starts and not when the button is clicked. By having command being assigned lambda as the function, you're getting around this limitation.
it would be way better if you could explain what does every line exactly do in the video. Like what happens if I put 800 there instead of 5000, or what happens if I make the font times new roman? would that work? it would take about 5 minutes or so to really try to make us understand. thx for the introduction anyway.
@@hürriyetpalestine i will not bother linking you to my drive where my exe file sits there. I did try and ExPerIMEnt and didnt see any difference. So I wondered what does it actually do. Also why there are beta testers and such then? Cant developers just ExperMEnT and see their mistakes?
Using tkinter is like walking with boots made of lead. Takes too long - too tough - so unnecessary. Anything short of a visual editor is a waste of time. This is not a reflection of the video - just the technology. I use MS visual studio. I can create complex windows applications in a fraction of the time it would take to use tkinter. Don't waste your time - don't use tkinter unless it is for the most trivial application.
Start learning Software Development today and make upwards of $100k+! techwithtim.net/dev I have a FREE intro course that walks you through the exact steps and topics you NEED to learn!
@TechWithTim, How can i reach you privately?
, i want to discuss something important with you
your videos are the best on RUclips you don't just say what to do, you actually explain everything and understand what your working with i really appreciate the content.
This is awesome! I plan to incorporate a text editor into my game engine, and this is a great logic guide!
I'll probably use OpenGL or Qt instead of TKinter, and write it in C++, but this is a great start!
For anyone wondering, to use bold, underline and highlight you need to use text tags and specify the area you want to alter the fonts 😊
How would you go about doing that?
Very carefully designed and clear presentation!
such good video is nearly impossible to make. great job tim. love your vids😁
it is just what I need ! tks so much , Tim !
I always wondered how one of these things was put together. Very interesting and well explained.
Great demo - Thanks Tim and Happy NY !
Great mini project man, love from India 🇮🇳.
it's so crazy, I literally was looking into a project like this, like yesterday, I was using chat GPT to step through some of the reasoning but it makes me feel like I'm in the truman show fr
Very unique project, would definitely stand out from others.
always fun and interesting to see your videos! Thanks for the content!
Super useful video! Thank you Tim ❤
Thanks for making these contents . I ReallyMean it
great tutorial!
Very topical. I am working on a similar project but with csv files and using tkinter. Nice vid
Always learn something new!
Thanks for the valuable content.
Good one. Keep on making a video daily.
Would be interesting to see a video on the PySimpleGUI module, which is pretty awesome and is easier to lean than tkinter imo
Great 👍
How to distribute this app to anyone who does not have python installed? When compiled to.exe the file gets detected as malware and no-one can open it.
same here
Hello Tim! It's been a while that I'd checked your channel. I should say you aged a bit and turned into a young handsome man. Keep up the good work buddy!
Is it possible to set styles of individual parts of the text? I'm thinking syntax highlighting.
Hi, Tim. Can I do this in kivy? Then, compile as apk for mobile phone? Thank you.
🎯 Key Takeaways for quick navigation:
00:14 📜 *Introduction to Python text editor project*
- Introduction to a Python text editor project using Tkinter.
- Mention of the project's suitability for beginner or intermediate programmers.
- A brief mention of a related course.
01:13 🌐 *Credit to the source of the project idea and code*
- Credit given to a blog as the source of the project idea and some code.
- Reference to potential future video projects based on blog ideas.
02:10 🖼️ *Introduction to Tkinter and its capabilities*
- Explanation of Tkinter as a graphics library for creating user interfaces.
- Mention of the grid layout system in Tkinter.
- Reference to the creation of a basic user interface.
03:10 🪄 *Creating a main function and the Tkinter window*
- Creation of a main function for Tkinter code.
- Setting up and displaying the Tkinter window.
- Explanation of the main loop to keep the window active.
04:36 📐 *Configuring window size and layout*
- Setting the title and size of the Tkinter window.
- Introduction to grid layout and its usage.
- Adjustment of row and column sizes within the grid.
06:34 📊 *Creating and configuring widgets*
- Introduction to creating text editing components (widgets).
- Explanation of widget placement within the grid layout.
- Setting widget attributes such as font and size.
08:34 🎨 *Styling and positioning buttons within a frame*
- Introduction to creating buttons and using frames in Tkinter.
- Styling buttons with padding and expanding them horizontally.
- Proper placement of buttons using grid within the frame.
11:36 🖥️ *Adding functionality to buttons*
- Introduction to adding command functions to buttons.
- Creating functions for opening and saving files.
- Reading and inserting file contents into the text editing component.
17:42 📝 *Changing the window title*
- Dynamically updating the window title to reflect the opened file.
- Showing the file path and action in the window title.
18:43 📝 *Lambda function for calling another function,*
- Lambda functions are anonymous functions used to write functions in one line.
- Demonstrates how to create a lambda function to call another function with specific arguments.
19:13 📝 *Opening and loading a file,*
- Shows how to open a file and load its contents into the text editor component.
19:44 📝 *Saving a file,*
- Explains how to save the contents of the text editor component to a file.
20:44 📝 *Adding keyboard shortcuts,*
- Demonstrates how to add keyboard shortcuts (Control+S and Control+O) to trigger save and open file commands.
Made with HARPA AI
Just if windows developers knew that it only could take them 20 minutes to write notepad
hey im a beginner, i want to know that which software is this where you coding.😁😁😁
I am having a problem. When i do the save button like i did the open button with the lamda stuff and everything like as you showed. and how its very similar to the open button. How is it that the Open button is working correctly, but I try to use the save button and i keep getting this error? "TypeError: save_file() takes 0 positional arguments but 2 were given". I mean I even used lambda like I did with the open button because I know you said you needed it to be able to do that. But why does the save one come up with this and the open one doesn't?
check your code and that you put the arguments in the save_file definition
def save_file(window, text_edit):
@@hürriyetpalestine you are right. That's it right there. How did I miss that. When I looked it was an empty section. It said "save_file():" when I looked. Got that fixed.
Sorry for being pedantic but I do believe it’s tk inter, as in interface. It’s part of the tk GUI toolkit.
You’re probably right, but everyone I’ve heard pronounces it like he does.
Lol, T Kinter goes brrrrrrrrrrr
@@shawn445 first time I've heard it pronounced like this. Then again, I've been doing this a while now, so I knew that Tk was a widget library, originally written for the Tcl programming language, but with many bindings to other languages, one of which being Python. So seeing the name Tkinter it was obvious that it should be pronounced Tk Inter as it is simply a python library for creating graphical user interfaces with the use of the Tk GUI toolkit. Not only is it for creating GUInterfaces, it is a binding to Tk, basically an interface between Python and Tk, hence Tkinter.
@@mileswilliams527 I understand that, but just like so many other things, how it is pronounced and what it was supposed to be are two different things.
@@shawn445 that’s true. I guess it’s just going to have to be like gif and jif, where the two parties just have to agree to disagree.
Awesome
Hi Tim does this work on mac? the window is not coming up on my mac
Let's build a text editor so you can build text editor while building a text editor)
Tnx👍
i just dont understand why did you wrote
text_editor.delete (1.0,tk.END)
To clear potential text written in the window before opening the file (to show the file content you need a clear canvas or the stuff would mix)
made my menu horizontal top instead of vertical side
i thought about making a text editor before and me before using my tiny brain thing that i need to use pygame that only does graphic for me and i need to create a whole new text system, i can't belive that i never thought of use tkinter. anyway nice video i liked it and i did the project.
How to make simulation like satisfying ba11s , project jdm and math floyd
No one is talking about this topic
They are now blocking the resolution of your videos. At 360 it's not visible
imagine if someomone makes the next intellij idea with this
Made one 3 years ago
Tim please the next video should be an advanced AI python course for intermediate to advanced programmers.
That's a big ask to randomly comment.
@@rmt3589 absolutely! 💯 but, fr we need it. I want to become a real master of python and I'm going to work on a company.
Why does tkinter feel like cheating and also I don’t understand why we need to lambda another function we’re calling anyway it’s the same for tic tax toe it makes hella confusing
he explained it, though not in depth. If you 'call the function directly' when you assign it to command, the function will be called right away when the program starts and not when the button is clicked. By having command being assigned lambda as the function, you're getting around this limitation.
yeni yorum
it would be way better if you could explain what does every line exactly do in the video. Like what happens if I put 800 there instead of 5000, or what happens if I make the font times new roman? would that work? it would take about 5 minutes or so to really try to make us understand. thx for the introduction anyway.
or you could just EXPERIMENT and see what happens.
@@hürriyetpalestine i will not bother linking you to my drive where my exe file sits there. I did try and ExPerIMEnt and didnt see any difference. So I wondered what does it actually do. Also why there are beta testers and such then? Cant developers just ExperMEnT and see their mistakes?
Using tkinter is like walking with boots made of lead. Takes too long - too tough - so unnecessary. Anything short of a visual editor is a waste of time.
This is not a reflection of the video - just the technology. I use MS visual studio. I can create complex windows applications in a fraction of the time it would take to use tkinter. Don't waste your time - don't use tkinter unless it is for the most trivial application.
I'll probably use OpenGL or Qt instead.
Hi
👍🙂👍
7:10
tkinter is so annoying... You cannot mix some widgets but it's not clear which have to be avoided...