Python GUI : From A-to-Z With 2 Final Projects | Mahmoud Raouf | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Python GUI : From A-to-Z With 2 Final Projects

teacher avatar Mahmoud Raouf, A programmer with 7+ years of experience

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

39 Lessons (2h 37m)
    • 1. Course Intro

      1:26
    • 2. How to create window

      4:12
    • 3. Labels with Button

      3:18
    • 4. Pack & Place & Grid

      3:30
    • 5. Releif Stayle in tkinter

      2:27
    • 6. What is bitmap

      2:39
    • 7. Cursor in tkinter

      2:31
    • 8. How to create Button Part 1

      3:01
    • 9. How to create Button Part 2

      4:19
    • 10. How to create function

      4:29
    • 11. How to create Entey

      3:59
    • 12. How to create Slider

      3:59
    • 13. Creat Class

      5:27
    • 14. How to create Tow Window

      5:09
    • 15. How to use Config

      4:02
    • 16. What is Lambda

      2:35
    • 17. Show Entery

      5:49
    • 18. What is the Frame

      3:32
    • 19. Prog and Scale

      6:10
    • 20. Spinbox and Combox

      3:42
    • 21. Resize Tool

      5:44
    • 22. Shortcut in keyboard

      3:01
    • 23. Label with Image

      4:51
    • 24. how to create RadioButton

      5:16
    • 25. Color on widget

      4:18
    • 26. Number and callback

      2:40
    • 27. Messagebox​ , Filedialog​ , Colorchooser​

      4:23
    • 28. Text Box Widget

      4:25
    • 29. Combobox with button

      5:54
    • 30. Checkbuttons in tkinter

      3:02
    • 31. Scrolledtext in tkinter

      3:36
    • 32. Label Frame

      3:36
    • 33. How to create MenuBar

      4:16
    • 34. What is the Canvas

      4:38
    • 35. OutPut in tkinter

      5:20
    • 36. Frame Destroy

      2:50
    • 37. How to create Animation Ball

      4:01
    • 38. Project

      4:05
    • 39. How to create a Calculate

      5:07
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

122

Students

--

Projects

About This Class

Welcome to Create Simple GUI Applications where we're going to use Python and Tkinter to do just that.

If you want to learn to build GUI applications with Python the learning curve is pretty steep. There is a lot you need to know just to get something to work.

Many tutorials offer only screen casts and miss the simple concepts that actually matter. Like writing any code, successfully programming Tkinter GUI applications is all about thinking in the right way. In this course I give you the real useful basics that you need to get building Tkinter applications as quickly as possible. I include explanations, diagrams, walk-throughs and code to make sure you know what you're doing every step of the way. 

By the end of the first 5 minute lesson you will have a running Tkinter application - ready to customise as you like. Follow this course every step of the way and you will be developing your first application in less than 3 hours!

this course for :

Python programmers who want to create GUI applications.

Meet Your Teacher

Teacher Profile Image

Mahmoud Raouf

A programmer with 7+ years of experience

Teacher

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Course Intro: Hello, guys. Hurry doing these. Mahmoud Roven today will speak about our new course, which is called Hello ticket, Sir, For those who don't know what's Kinter is, I'm gonna tell you that Tick Inter is the official GeoEye library for the programmer language Python years, in which you can create many GeoEye applications in the simplest way. What makes our library special is that it's old and stable. So you know what? Let's talk about our course. So in our course, we have three basic faces. The 1st 1 is the basics face and which we will know all the basic solve the library on in the 2nd 1 which is the advanced face, we will know all the tools that we will use in the library, which qualifies us to go to the third phase, which is the simple abs face in which we will apply those tools that we learned in the second phase. And we will know how to use them and how to organize them professionally on the window and how to preferment the Commons perfectly. And in the future, we will provide you with many abs guys. So our courses not just stopping right here because it's being updated all the time and we will try to provide you with the biggest number off APS that we can and we will apply new ideas every time in many APS. So if you need any help, you can just call for help all the time and I'll be right there to help guys. So I hope, guys, that you will join the course and see right there. 2. How to create window: Hello, guys. There's more drove and in this course will speak about that. Seek inter library at the beginning when you start a course of the python programming language, so you have to start by the basics and then you will move on to a library where you can apply those basics and that will allow you to choose the bottoms of the labels and so on, in a certain way, a current of this library that you will use. So, for example, if you're gonna be specialized in the GeoEye, so you have many libraries that you can use, like the tick Inter library that we will use in this course using what she can make a desktop application. So it's a strong library that you can use to make a lot of applications and an easy way. We also have the Cavey library, which you can use to make an application to the Mac, to the IOS, to the windows, phone to the windows and all of this. You can use it with one code and you will find an explanation by me on my page on getting me. So in our course, we will start from the scratch until you reach your first application. So it's not talk too much and it's start. So at the beginning we will invoke the library while yet right in from Take Inter and poured Asterix. And that means I will import everything, which means that I'm important all the tools that I can use in this library. Then I will get a window and I will connect it to the library. So I will say that it equals TK which stands for two Kinter. Then I perform a main loop which allows me to draw everything that I'm doing in my code in my window. So by default we have some carnations where I can put my window. But if I want to change these carnations so I can just use geometric and I can't say, for example, 500 by 500 this is the width and the height and then 300 plus 150. And this is the position where the window is gonna be and we will see this later in a practical way. Then I cannot change the title off my window, so that's not talk too much, and that's go to start practically so at the beginning. We all start by using the pressure because it allows us to use the other complete in a perfect way, though at the beginning we were right from chicken, sir, in poor Asterix and you will find out the other complaint is going on with us. Then I would write window equals, take a and take care of the upper case letters. Then we were right window dot main loop and then that's run the code and you will find that the winter will appear right there. And this is the width and the height of the window and you will find that the title of the window is TK as we determined in the code. So if we want to change these things so I will go ahead and I were right window which our window that Dimitri and the geometry We are using it to change the position and width and the height of our winter. So I will write 500 by 500. Then I will write 150 from the width and 300 from the height, which we can use it for determinant position. So let's run the code, so you will find that the position has been changed. It left about 150 from the left and 300 from the upper side. And the size became 500 by 500 as well. So what if I want to change the title so I will write window. The title equals hello T Kenter, for example. So you will find that the title of the window has been changed as well. So right now we invoke to the library and we imported old the tools that we can use. And then we created a window and we connected it to the library. Then we give it a dream a tree to change the height and the width and the position of the winter. And we changed the title of the window and we use the main loop to it. Execute all of these tools on my window. So that was a simple listen and we will not make the videos as long as possible. We will make it strong. It's possible to you to execute everything that we are taking in every listen in a simple way. I hope that you like the explanation in this video and see in the next video guys 3. Labels with Button: Hello, guys. This mama drove in today will speak about the labels and the buttons. So at the beginning, we will use the same window that we used at the last time. And we will create about on it and we will give it a text to bay buying, for example. And then we will change its state. And then we will make it dark pack. And then we will go ahead and create a label. And then we will change its text and we will change its color as well. So let's go to try this by the code. So at the beginning, we will create about. And so we were right. B equals, but and then we will give it a text to be, for example, hello to cancer. And let's go ahead and to try to see this on the window without writing duck pack. So once you run the code, you will not find the bun because we we didn't determine how it would be Drone right there on the window. Okay, so we have, for example, place We have grid, we have pack and we didn't determine so today we will speak about the pack and we will speak about every kind of them in a different lesson. Okay, so today will speak about the pack. So let's go ahead back to the code and write that pack. And now let's check it and you will find that the button is appear in front of us right there on the window. So let's go back to the code to create a label. So we were right. Ill equals table. Let's give it a text to be hello to cancer. And we were right that pack as well. And here we go. You will find that it's appearing right there under the bun. So what if we want to change its color to be more visible? So we will go ahead. We will change its foreground color. And we were right. So if j equals red, So once you go to check the label, you will find that the color off the phones has been changed. Okay, so what if we want to add a background, you will go there and you're right in the code B G equals blue, for example. And once you check the label, you will find that the background of the label has been changed to be blue right here. Once you click on the button, you will find that it's active and we can click on it. So what if you want Teoh to make it disabled, so we will go ahead and change its state? So we were right. State equals disable and take care, because disable must be all it's ready. Letters must be uppercase. So once you go to check the bottom, you will find out it disables. Right now, we know how to make about how to change its state, how to change the labels color and for ground, the background and everything. So now what if we want to make space between the button and the label not to make them attached to each other like this? So we will go ahead and we will add that something that's cold patty, and let's give it a value by 10. So once we go to check the window, you won't find a space between the button and the label right now. So and we know how to use the pack and how to use the labels and bottoms and how to change its properties. I hope that you understood the lesson, guys and see in the next video 4. Pack & Place & Grid: I know guys is my mother Open today will speak about difference between the pack, the place and the grit. So he spoke about the pack before and we said that it's like a container on the main window that contained some tools that I put on the window and it appears exactly in the middle of our window. So what if I want to change the position of this pack on the window? The first way is the place, and we can use this way. But given a D coordinations by X and Y, which represents the height and the width so we can use it to give it carte nations to the place that we want to place the pain in our window. And those values for the coordinations can be changing from zero until infinity. The second way is the great and the great that uses rose and bottoms, and the row, or the first value in the rose, starts by zero and as well it goes at the column. So let's go and try this practically so let's go ahead at this part right here and let's delayed the pack and let's give it a place value by 100 for X and 204 way. Let's try this and, as you see so you will find out. The place of the button has been changed on the window, according to the carnations that I gave it to the value or to the value of the place as we rode on the coat. So I left his place by 100 from the left side of the window until the left side of the button, and I left a space by 200 from the bottom or from the tub of the button until the tub of the window. So let's change the place of the label as well, so we will go ahead and will give it the current nations for the X to be 300. And let's make the white B 136. So let's go ahead and try this, and you will find that well, if this pays from the left side by 300 from the tub by 150. So in the other hand we have the screen here divided into Russell columns. So what if I want to use these rows and columns to change in the place of some intimate right there, if I want to play is the button at the first row and the first column, so I will give it the value of zero and zero if I want, place this label in the second row and the second column, so I will give it the values of one and one. So let's go ahead and try this. So we were removed the place and will give it the grit. Let's give it droves to be zero, and it's given the value of the columns to be zero as well. On its tried this, you will find that the button has been placed on the tub left corner, according to the first on the first row and first column. So let's place this label to be the first row and the second column, So we will keep the rose by zero, and we will make the column by one. So if we go ahead and change the value of Rose to be one, you will find that the place will be changing, occurring to the current nations or through the values that we are given to the rows and columns right here. So I hope that difference between the place and the grade as obvious in front of you guys. But the places using the carnations and the greatest using the roads and the columns and the pack is put in my elements in the middle, off the scream. Thank you guys so much and see you in the next video. 5. Releif Stayle in tkinter: guys, There's mammal drove today will speak about the relief style and how it changed the style of the bottom. Okay, so first of all, you will create about him and then you will give it the relief style. We have many styles and all of them are already existed in the library and we are just invoking them. So I will give you just five types to give you an example. I'm not to make this video so long, so if you check this out, you'll find that those are the shapes of the bottoms that we will have at the end. So let's go to check this on the card. So at the beginning, I will deactivate the label and then I'll change the grade to be packed so it will appear in the middle off the screen. Then we will go right here. And then we were right. Relief equals Okay. We have all the types in the library. We are just invoking them. Remember that. Okay. And know that all the letters are an upper case in the name of these types to the first time that we have is the sunken. So let's write it right here and this check, How does it look like? So, as you see, you will find that the shape or the style of the bottom has been changed. So once you try to click on the bottom, you will not be able to click on it. So let's try the other styles. So we will take this as a copy to make it easy. And let's try to make five shapes. So we will change the styles right here. The 2nd 1 is gonna be flat. The 3rd 1 Let's make it groove. The next one is gonna be race side and the last one is gonna be rich. So let's go ahead and check this out. And here we go. So you will find that the first style looks like it's disabled. The 2nd 1 it looks like it's so flat. So it's part of the screen. The 3rd 1 looks like that the 4th 1 is like it's going our as prominent at a little bit. On the last one, you will find that it's around by a stroke right here, which is the rich. So we have a lot of shapes right there, guys that we can use. And I will leave a lot of them right there below in the description. So in case if you wanted to use any of them, you will find them right there, below in the description. So in this video, we know how to use the relieve guys. And I hope that she'll understood everything and see you in the next video. 6. What is bitmap: it all goes. This model drove from today will speak about the bit map. So what is the bit map? So the big man makes May allowed to change the shape of the buttons Be different to have ah , special mark Wait and sign a circle man with a question mark inside of his head or whatever . So it allows me to change the shape of the button self so you will find some shapes right here, as the 1st 1 is the error. The second one's like the hourglass, the info mark, and you will find a lot of shapes right here. And let's go ahead and try this practically to know more shapes and to know how they will look like inside the program itself. So it's laid all of those pardons, and that's gave the 1st 1 to work on it. So we will go ahead and then we will delete the relief and we will give it a bit map. Let's give it a value by error. Once you run the code, you will find that the shape of the bottle and self has been changed to be like an error right here. So you will find that the buttons right there and it has signed and you can use it. Still, it doesn't have any name. It doesn't have any rain value, but it has a simple on. You can use it as a normal bottom. So let's take this line right here is a copy and let's repeat it and let's give them different shapes. So let's give the 2nd 1 the value of the hourglass. Kate. It's made the 3rd 1 to be info the next one. Let's give it a value of grey. So we have great 75. We have great 50 and we have great 25 we have great 12. We will speak about the great right now and we have the Quest head. We have still the weren in, and let's make one more to give it the value of question. So let's go ahead and run the code and you will find this in front of you. You will find the whole buttons are right there, but all of their shapes have been changed, so you will find that the 1st 1 is like an area of the 2nd 1 is like an hourglass. The 3rd 1 is the IMF. Assign. The 4th 1 is great 75 and you will find that the more you increase the number after the grey, you will find that the dots inside the sign or the circle or the bottom has been increased . So there's a difference between great 12 right there and gray 75 right here, and you will find in many other shapes right there, below in the description. I hope that you like the video guys and CNN is very 7. Cursor in tkinter: guys, This mama drove and stale speak about the cursor. So the cursor is something that allows me, in this type Larry, to change the shape of the mouse once I point on any bun. So we have a lot of shapes that we can use in this library, and we have really a lot of shapes, but we will use only a few of them or some of them just not to make this video too long. Okay? And I will leave all the shapes or the most of the shapes right there below in the description. So it's go ahead and see them in a practical way to see how that will, that you look like so at the Begin and we will delete all of these pardons and we will leave on the one right there to trying it so we will give it a relief to be, Ray said. And let's give it a cursor to be like a circle. So let's try to run the coat, and once you're on it, you will find that right here on the screen, you will find the bond right there. It's normal and everything is OK. But once your points added years in the mouse, you will find that the shape of the cursor has been changed into a circle. So let's try the rest of the shapes. So let's take this button as a copy and let's paste it right here in many copies right here . Okay, let's go ahead and change the shapes. So all of the shapes you will find all of them. So all of those shapes you will find all of them in the library by default. So the 2nd 1 it's making as, ah heart the 3rd 1 Let's make it as a plus. We have a clock. We have the dud bucks. We have a man, we have mouse. And let's try some shapes right here. So those all the shapes that we will use in this video today Okay, so you will find that once around the code, when I point at the first button, you will find that it shape of the cursor has been changed to be a circle, the 2nd 1 to be as hard the 3rd 1 to be as a plus, the 4th 1 to be as a clock and so on. So we have a dud. Bucks. We have a man. We have a mouse. So we have a lot of shapes right here. And all the shapes are being changed. Once I point and the bottoms, I will leave all of them right there, below in the description, guys. So I hope that you understood everything and see you guys in the next video. 8. How to create Button Part 1: Theo is Mama Drove today will speak about the buttons and what are the properties that I can add to with the buttons? This time we will go deep about the properties. So at the beginning we will create our buttons as we learned at the last time. But I will change the size and will not depend on the they fold size the library has already for the button. I will change it and I will give it a special size. I will use the height and they will use the way. And then I will change its color by using the foreground and the background properties. And then we will know the difference between the foreground background and the active foreground and the active background. And then I will give it a cursor and they will give it something called a PD. And the PD is like a frame around the bottom. So let's try this practically so the beginning we will lead to the bottoms that we created at the last time and we will leave just one. We will go right there so we will delete the relief and the cursor and then I will give it with a and heart. Let's give it a with by 30 and let's give it a height by 25 and let's try to see the button right there. So, as you see, you will find that the pardon is appear in front of me. You will find that the wit is 30 and height is 25 so let's try to give it a background and give it a foreground. You will find that the background is the color of the button itself, and foreground is the color off the word on the bottom. Okay, though, let's go ahead and check our bottom. You'll find that the background of the button became green and the foreground or the word on the bottom, became white. So once you click on the button, you will find that the colors are being changed. So I want to change these colors when I click on the bottom. So these colors that are appearing in front of me when I click on the bottom there will be a changing as well. So that's why I will use the active background and the active for a gram, though we will give it an active background to be read, and let's give it an active foreground to Bayu blue. So once you click on the button, you will find that the color of the buttons being changed into red, and you will find that the color of the word on the buttons being changed into blue. So now the border off the bottom. It doesn't look cool, so it's give it some border to make it better. So we will go ahead and we will surrounded by a border. Also, let's give it a B D, which is sense for Porter, and let's give it a size by 30. So you will find that the border around the bottom has been changed. This will, and when I click on it, the border changes as well. So what if I want to add a cursor? So when I point on the bottom a. The shape of the cursor will be changing, so I will give it a cursor, and let's give it the most suitable shape right here to be the hand. So once you try it, you will find that once you are pointing at the bottom, you will find that the shape of the cursor is being changed into a hand. So now we know some properties around button and helps use it and have to use them with the bottom to change its shape. Thank you guys and see you in the next video. 9. How to create Button Part 2: I have guys. This mama drove in today will speak about the second part of the body. And what are the methods over the properties that I can add to the buttons? So the beginning we will speak about the underlying and the underlying is a line that I can put under any letter that I want in the name of my button. And I can choose any letter in the name started by zero So controlling the letters by the index of each letter. So it starts by zero. Then the second letter is going to be one. The 3rd 1 is going to be two and so on and we will talk about the state and its cases. And then we will speak about the most important part, which is the photo. And I will know how to import a photo and how to put it in my bun. Though my button will be appearing on the window as a photo. So I will create at first to a variable, and I will make it be named as photo and then it equals photo image. Then I will pass a file and the file here is the image that I want to could instead of the bond. But I will write the name of the photo and then the extension out photo And the image must be existen by the file of the project that I am working on. And I will import this variable inside my parents who would make the photo appear on my bottom. So let's go ahead and see this on the Bachar. So let's go first and start by making an underlying and it's given an index by zero. So we will put a line under the first letter so you will find a lion right there under the letter H. So what if I want to put it under the letter? O so I will go right there and I will see that it 0123 and the middle O is number four. So I will go ahead and it will pass the value to beat number four. So if you go ahead and try this, you will find that the line became under the letter O. So now we know what is the underlying. Now when I click on my button, you will find that it's active. So what if we wanted to be disabled, so we will change its state bullets. Right state equals disabled and be careful. Dad, Disabled must be written in uppercase letters. But now, once I click on the button when I run the code, you will not find that it's working because it's disabled right now. So now if I change the state to be normal instead of disabled, you will find that the button is working again. So now we know what is the state, and we have two cases, normal or disabled. So let's go ahead and work on the photo, which is the most important part of the lesson after day. So let's go ahead and write photo equals photo image and then we will write file and here we will write the name and extension of the picture that we won't use. So let's go ahead to the folder that we are using or we are having the project inside of which, so to make everything easy, we have to put the picture right here by the file that we are working on. So once you get the properties of the photo, you will find that the extension of the photo is start TMJ and its name is one, but we will go ahead to the code and we were right in the file part one dot p. N j. So once we were on the court right now, you will not find it appear in on the bottom. That's because we didn't put it inside the button itself. So let's go ahead inside the bun and it's right. Image equals fouda, which is my variable for the image. So let's run the code, but you will find the picture appeared in my fun and you will find that the width and the height of the barn has been canceled. But the picture is small right there and still appearance. So let's add highlights thickness and let's make it equal to 200. Let's try again, and you will see that the size of the button has been changed. It became 200 by 200 because the highlight thickness it allows me to change the height and width of the bun in an equal way to the West and the height. Though now, in this lesson, we knew what is the underlying what is the state and we know how to take a photo to put it inside of our button. Hope that you understood everything that is connected to the bun. And I hope that you understood everything, guys and see in the next video. 10. How to create function: Theismann with different today will speak about the function. So how it's a curated function and have to connect it to your partner. So as we know in the last videos that we can create a label and we can give you the text for the foreground d background as we learned, and we will give it a new attributes to change the phone size. Then I will create two buttons and we will give you the text, the foreground in the background and then we will create the front. Then we will make your function when we will call it death. Hello. So this is the name of the function, and inside of it we will create a label and we will give it the same attributes that we spoke about. And we will create this function by our burdens. So when you click on the button, the function will be executed. So as you see in the first part, we made the comment connected Teoh Hello, which is the name of the function. And that's why when I click on the button, it will make the label that is inside of this function appears in front of me and the same idea in the second, but as well. We made the comment connected to delete, which is the other function. So let's go to see this practically so at the beginning, this hour window. We created it before we start the video just to save some time. So now we will create our label. So I write, my label equals label and we will give it the text and we will call it welcome. Then we will give it the colors off the foreground and the background. Then we will use the coats. They exit decimal coat. So let's give it a color for the foreground and the background as well. And then we will give it the phones so we will give it the phones is 10 for example. Then we will give it the pack. So now the label will be executed on the window. Once are you run it by the same colors that I gave to it. Now my Barton equals and we will give it the foreground and the background right here in the text is entered the front as 20 and we will write top pack. So let's copy this button and it's paste it again, so we'll create another one and we will change the names for sure. And it's named the other one deleted. So once you're on, the committee will find that the label and the till buttons are appearing in front of you on the window. So now we want If I click on the button which is enter, it will make a label appears in front of me right here. So that's why we will create a function. And we were connected to this party. So let's go to carry the function. We were right death. Hello. So you can give it a name that you want. Then we will create a label and we will give it a name by L. Just to save time. We will take the same line off the label that we created before, and we will put it right here. So we'll change the name. That's call it enter and let's change the color to be yellow and the bee gee's gonna be orange. So now I created my function and I wanted to be connected to my pardon. So I will go right there in the barn and I will write comment equals hello, which is the name of the function. So once you're on, the Cody will find that the label and the two buttons are appearing in front of you normally. But once you click on the button, which is enter, you will find the label is appearing right there. So now I connected the but to the function that I created. So once I click on the button, you will find there the label disappear in front of you. So let's create another function for the other bun. So to save time as well, we're gonna take the first function as a carbon spaced it. So in the other function that's changed some things like, Okay, the name of the label we're gonna make it out to. We're going to switch the colors of the phone foreground and the background to be the opposite of the first label in the first function. Let's go ahead for the first or the second button, and let's give it the comment to be equal to Okay, let's change the name of the function to be deleted, and then we will go to the second button and we will write the common to be delayed. So once you run the code and you click on the first part, you will find that the first label appeared for you. And once you click on the second button, you will find that the second label disappearing for you. So, as you see, we switch it the foreground by the background in the second label to be the opposite of the first people to know we knew how to create the function and how to connected to our button . And once you click on the part and how to execute the function, I hope guys that you fail in this lesson was been official for you, Thank you so much and see in the next videos. 11. How to create Entey: guys, this mama drove And today, when we speak about the entry So the entry is the space where I can write its extra value inside our window. So I want to connect this entry to a function that I will create. So I will say that the text variable which is the text that is contained inside the entry, equals big and B is a missive that I created which is admitted equals a string of our though the string far which is the string variable. It takes the value from the entry and then this value which is inside my metal. Right now I connected to my function. So I write m equals b dot gets and I mean by this to get this method. And then I created the label and connected it to my method. That means I connected the Emma to the label to again. My method is the string bar that takes the value from the entry in my winter. So now you should understand that it's like a chain. Okay, so the entry gives a value to the string far and the string var gives a value to my function right here. So That means when I click on the button right here that will make the value inside. The entry appears in front of me. So it's go ahead and explain this practically and everything is gonna be more clear. So at the beginning we will write text equals entry and we will give it text variable equals And we should write the method right here. But we will not, right? It's name on suddenly make it. And then we were right. Don't pack. They will create a message and I will say b equals a string bar. Then I will pass this value, which is B two right there to this line right there. So I will write a string of R equals B. You know, I connected every single value that will be written in the entry to the string bar. So anything they will write in the entry, it will be connected directly to the string bar. So now we want to connect the string bar to my functions. So I will go right there. And you're right. Em equals beads are get, but get my method. So them right there got my method and the method got what's its ridden inside of my entry. So it's all connected. The entry passes to the method and the missus is passed to the function. So now I want my value to appear. So I will go right there in the text and label and to make it em so the M, which is my value, will appear instead of the text. So M, which is my value, will appear instead of the text on the label right there. So if I run the core right now, so you will find the entry is right there. So I will go right there. And I will write any value like, for example, to counter. And once I wrote this value so the string of are identified it right there in the code and this value has been connected to the function and dysfunction is connected to the bottom. So once I click on the bottom, you will find that the value off the entry has been appeared in front of me right there in the label. So again, once a quick on the button, it will activate my function which is connected to the string bar which is connected to the entry So now everything became clear. It's like a circle, so the injury takes value and then it gets passed to the string bar. Then it goes to the function than it's being passed to the text. And then this text will be the name of my label, and the label is connected to the button number one. But once I go ahead and write something different inside the entry and then I like on the button, you will find that these values will be important in front of May on the window in another label, Don't know, everything became clearer. Now I know how to use thestreet of our method and how to make an entry. So I hope guys that you understand and dressed I want you to repeat the explanation more than one time and to try to apply this as many times as you can as I tried to make the explanation as simple as I can, guys. So thank you so much and see you guys in the next video 12. How to create Slider: Hello, guys. There's Mama drove from today will speak about the slider in the teak inter library. So at the beginning, you will summon or invoke the library in that you will create your window. Then you will create the slider. So you will give it a name and then you will make it equal to scale. And then you will give it the properties. Then I write from 0 to 100. This is the scale that I want to give it to the slider. So it will start from zero and it will end on 100. So right here you will find that we put on underscore after from exactly because from is a reserved toward for the library. So I cannot use it this way. So I must put this underscore after it. So what if I want to start this lighter or the start of the value of a slider from a specific value? So I will write the name of the slider and I will give it set and then I will give it the value that I want thes slider to start from it. And after this we will use the pack with it like any other item that we have. So let's go to try this practically So first of all, we will invoke the library and then we will create our window. So master equals TK. Then we will give a J a Metarie value to the main window or to the Master. So it's gonna be 400 by 400 for example. And this is the size of the window. Then let's give it the main loop. So we will create the main loop right here. So now we created the window. Let's create the starter. So we were right s one. There's the name of the cider equals. We will task our window so we'll write the name of our window, which is master. Then we will give it a scale from 0 to 100. So if you try this out right now, you will not find the slider. So you must create the pack or you must write packs. So we will write s one the attack. And then we will run it. And here we go. You will find this tiger right here. You will find that is starting from zero. And if you slide right here, you will find that it's reaching 100. I can't put any value. You can just put it from 0 to 1 million if I want. So any value is available and it's up to you and up to what you want. So what if I want to start from a specific value So I will write set and we will give it the value that we want. Like okay s one dot set and we will give it 45. For example, Once you run the coat, you will find that the cider is starting from 45. So let's create another one. So let's go ahead and write s too equals scale and we will give it the window. And then we will give it from 32 3000 and you can't put any number that you want and then we will give it the pack on Let's run the coat. You will find that the second starter has been created on our window and its values starting from 30 reaching 3000 Now what? The increment that is happening to the values in our slider is happening by managers. So if I want to add a resolution, so I just will go ahead and write. Resolution equals 0.1. And once you're on, the committee will find that the increments happening right there on the slider and the resolution is effective right here. So now we know how to make our slider. And while when we give it the property is why we are at in this honor school right there after from because from is reserved for the library. So if I want to use it, I have to add something after from, like, a specific mark like the underscore. And then we created another slider and we know how to and the resolution. And we know that we can add any value that we want. The values are right up in front of me. So thank you so much, guys. And see you in the next video. 13. Creat Class: his mama drove in today will speak about an advanced level in the library. So we will speak about the basics that we talked before. But at the same time, we will switch to another level. So in this time we will learn how to create a class. So at the beginning we will import the library so and then we will import the patterns and the labels because we will use them. Then I created across and I give it a name. And then I wrote diff in it self master. And this is the name of my winter. And now I'm put in this self right here because I needed to connect everything that I will create to our class. So when I create a label, I will write self doubt, blah, blah, blah like self, the label self the bun and sew like worry right here at solved. A master equals master. Now I wanted to put a title for the windows, so I wrote Master the title and they give it the name, which is geoeye and right here. If you notice we are using the self and it's very important guys, because if we don't use the self and we create a bond or a label and so on. It will never be connected to the class. So we need to connect it all the time to self to connect every time that we create or everything that we create to the class. Okay. Using the class, we can create one function or two or three as we want. As right here we created a function that I was made to print. Welcome paper. So, as you see, we connected it to the first button. Then we said that the root is connected to the TK So I connected my library to the road. I connected the road to my class and I made Brooke. I created a main loop to make it appear in my winter, though let's try this practically so at first we will write from tick enter. So at the Begin and we were right right here TK Important TK Label and button and I will create the class that I want to create. So I will write class and I will give it a name which is my first J y. Then I will go to write death in it and I will give it the self and the name off my window , which is gonna be master. And then I will write self. Don't master equals master. So right now we created our window inside the class. Now we want to give it a title. So we were right. Master that title GeoEye And this is the title of our window that will appear on the window . So now I created the window and I give it a title. Okay, so let's try to connect to the winter to the root without creating anything or attach anything to the window. So let's write root equals TK. Then we were right. My geoeye equals my first, Do you? I and we will give it the road and then we will write route main loop. Now we will execute this and let's see what's gonna happen though. Well, we will find out the window appeared in front of us right here. So what if I want to add a label or about him, But I will use the self because the self connects my labels on my binds and everything I create to the class and the class is connected already to the window. So everything is gonna be connected using the self. So we were right. Self label equals label. Give it the name of the window, which is Mestre. And we will give it a text which is gonna be Hello, Kenter. Then we will write self duck label Doc Pack to make it appear on the windows. So once you around the card, you would find that the label is appearing right now on the window. So what if I want to create about and so I will go ahead and we're right. Self toe pound equals spun. And we will give it the name, which is master, and we will give it a text, which is welcome. And we were right Selves about pack. And that means the button will be added to the winter. As you see right here. So this Korean, another button, we will take the first part as a copy. And let's face it right here, we'll change the name. Let's make it button to and let's give it a text. Just gonna be quit. And it's run that the code. You will find that the other button appeared on the window right here. So as we said, we can create a function or two or three or as many as we can, but the point is that here we will create a function. So let's call it death great and self right here. And then let's go ahead and writes print. Welcome, python. Once around the code, you will not find that the function has any effect on the window. So you have to connect it to a bond or something. So let's go right here and connected to a barn, though if we go right there on the bottom and we give it a comment to be self dot Great. So once we click on the button, you will find that the function will be executed. So once you click on this pardon, you will find that the word or the sentence Welcome. Pathan is being printed right there. So the other button we want to like if we click on it and will close the whole window so we will go right there to give it a common. We will raise come and equal semester dark Quit. So once you run the code and you click on this button, you will find out the window will be disappearing from there. So in this time, we learned how to create the window. Have to create the labels, help to create the class, how to create the labels and the buttons and too connected to the class into the window and how to create functions to connected to these parents. So once you click on them, you will find that a specific function will be executed over your window. I hope, guys, that you found this lesson beneficial and see you guys in the next video. 14. How to create Tow Window: Theismann. Muldrow from today will speak about how to make two windows. So in the previous lessons, we learned how to make a window and how to create about in an entry inside of and how to connect all of them to Ah, you function. Okay, so now if we want to make to windows and I want to put the button in the 1st 1 and I want to put the function in the 2nd 1 So how to connect between bubblegum? This what we will see in today's lessons? So at first we will get the first window that we were working on before. And we will change its name to be old. And we will change the geometry and we would change the title. And we will carry eight the look. So to create another window, we need a name for it. And we need TK. So we created another one. So you will tell me what if we create another window, though? Should I make a loop to every other window that I will create? So I'll tell. You know, it's only one loop that we create for the first window, and the whole code will be executed occurred into the slope. Then we will change the title of every other window. We will give it a geometry, so I give it a title and I give it a button I create about inside of it. So my baton and my label and my function and everything how they appear though they appear , am the first window. So the first window reads the label and button and function. But what if I want Teoh put these items in another window or to appear in another window? So I put the name of the window before the text. Whatever the number of the windows is, it doesn't matter. Okay, so we put the name of the window before the text and the partner or the label or whatever. We're appear in this exact window, though let's try this practically, and it will be better. So at first we will change the name of the window, the old one to be old, and we will change the Geum entry. So if you're running, you will find that everything is running and everything is fine. So let's create another window and let's write new equals TK. So if you're in it, you will find that two windows with appear in front of you. And, of course, the other window doesn't have a geometry, and it doesn't have a title and doesn't have anything. So let's give it a geometry by taking the old one to copy it and two paces right here. And then we will change the Gymboree. So if we give the other window the same geometry, D will appear on each other the two windows. So let's give the 1st 1 100 so it will take 100 from the width. But to make a difference, Let's make it 700 for the other one, so that will make The width is different and the high it is the same and doesn't matter, they will appear, and it's changed the title. Let's change the name of the window that's called a tick. Enter, for example. So if you're running, you will find that the two windows will appear in front of you like this. And when we change the width or the geometry, you will find that the positions of the two windows changed as well, and they are beside each other right now and even the titles are different right now. So what about the bones and the labels and the entry? You will find that all of them are appearing in the first window. So why is that? Because all the items or the gadget sorely labels the buttons. The entries and so on will be performed or executed over the first window, and this happens by default. So what if we want to change this? And what if we want to add the button from here into the other window? So let's go to the court again. So we will go right there before the text of the button, and we will write the name of the window that we wanted to appear in. So that's a go right there, and it's right new and let's run the coat And here we go. You will find that this part appeared in the other window, not the 1st 1 and when I click on it, you will find that the function is being executed on the first window. So what if we wanted to appear on the first windows? So we will go there before the text and we will write new and Let's connect the function. Teoh the new window and let's from the court right here, though if you enter anything right there in the text box and you click on the button in the other window, you will find that the function will be executed on the new winter. So if you click on this part and you will find that the function will be executed on the noon winter. So now we know how to connect between two windows so we know how to use the tilt or the gadgets that we have or the items and tell to connect them between two windows. And what about geometry? What about the the default window, how to act or how to deal with the loop and about the title? And what is the Duke that we need to execute all of those orders right here or there? All those comments right here between the two windows. All of this we had in the listen off today. I hope you guys to revise the previous lessons and to revise all of this again because there is so important. I hope, guys, that you like the very ones here in the next videos 15. How to use Config: is Mahmoud Roven today will speak about the conflict and how to use it. Teoh it. It's the properties off our bottom. So in the previous dozens were talking about the buttons and we will just making the button . We will create an end and we will given it a common and those Commons. We were connecting them to the functions to make a specific task. So if I don't want to create a long code so we will use the conflict Teoh give the but in the properties that we want to give, like at an image, changing the colors or whatever and all of this weekend used the conflict to do it. So if we want to perform this at the beginning, we will create or we will invoke of a library. And then we will import the titty K and the U. K. Is a part of the library and we will put it right here by the bottom just to be created. Then right there we will give the conflict of the bun and we will give it the property that we want to do or do we want to change and we can use the conflict with the image so we can import the image at first and we will write the name of the image. We will give it the extension and focus. And remember at what? The last time we spoke about the image, we said we must put the image by the same file that we are working on. Then we added the conflict than we added the image. And then we imported the photo image by its name right here, which we created. And then we use the compound so weekend put the name of the bun which is click me right here. We can put it right or left up or down as we want. So it's tried is practically. You will find that right here we invoked the library and everything is OK. So we will go ahead and we will create the bun. And then we will write t two k dot Bon. Then we will pass the window and then we will write the name or the text of the button right here, which just click May. And then we were right button. Don't pack in this way. We created the button on the window. So let's create a function right here That's called, for example, cold back. And then let's write print photo. Okay, this function right here, we need to connect it to the bone so we can connect it to use in the comment. Or we can go down there and we can connect it to use in the conference. We were right button so we can connect it to use in the conflict. So we were right buttoned up conflict. We were right common. And we will give it the name of the function that we have. Once you run the code right here and then you will click on the bone, you will find that the word photo will be printed in front of you. So, as you say, you will find that the confidence working and it connected our functions to our button right there. So what if we want to add an image so we will go there and let's create name from, or the message which is logo equals photo image. And then we will give it the file or the image that we want to add. So let's ride the name of the image, and then we will write dot g I f. So we want to connect this image to our button so we will go ahead and we were right button dot conflict and we will write image equals logo, which is our method that contains the image. Once you run the code, you will find that the image will be on the button. Exactly. So if you click on it, you will click on the button and you will find that it will print photo. So if I want to put the picture on the left and then we will create the text, so bother them will be beside each other. So let's go to try this. So to put the image on the left. So we will go ahead and we will write compound. And then we will right left. So you will go and check it out and you will find that the image will be beside text. Exactly. So now we learns how to use the confit again. Have to adjust the position off the photo on the pardon itself. Thank you guys so much and see you in the next video. 16. What is Lambda: guises. Muldrow from today will speak about the Lambda so the lambda is being used to give a specific task Teoh a specific bottom that we have. No. Instead of writing a long code to perform a task, we just use the land and it makes it easier. So let's go first and talk about destroy. So at the beginning we create our window and then we go ahead and create our button. Then we were right. Calmund equals Lambda and we will give it the name of the button and then we will make it dark. Destroy. So once you click on the bottom, you will not find it anymore. So let's go to try this practically at the beginning, we will go ahead and we will invoke our library. Then we will create our winter and we will give it a name, which is TK and we will go ahead and we will create the main loop for the winter. Then we will create a button so we will given name equals buying window and we will give it a text, for example. Push here. Then we will give it the Commons of the Lambda. We were right coming and it will equal Lambda. We will give it the name of our button, which is L. And then we will write dot Destroy. So once you click on the button, you will not find it anymore. Then we were right. L thought Attack. So let's go ahead and check this out so you will find our button right here on the window. The Lambda is being used to give it a specific task to the button. So once you click the button right here, you will find that it will be destroyed. It will be vanished away from the window. So this is exactly the task of the Lambda. So instead of writing long code a lot of lines just to perform a specific task use in a bomb. So we just write Lambda and we give it the common that we want to perform over a specific bond. So it saves a lot of time and a lot of effort. Though it's performed the common quit Let's go, we give it Jim Eatery and let's give it 400 by 400 for example, And let's go ahead and check this out. So once you go right here and click on the button, you will find that the window will be closed. So again, let's recap. So we used the Lambda Teoh save a lot of time and a lot of effort. So instead of writing a long code on a lot of lines, stress to perform a specific task over a pardon. So we are just using the Lambda to perform the same task or the same commons on the button without right in a long coat. Help the truth like the Listen, guys, and see you in the next video. 17. Show Entery: three more drove friends, they will speak about the entry and how to connect it to other bottom by using a function. So we will know how to print the tell you that will be inside the entry on the terminal. Once we click on the bottom the beginning, we will create the label, the bottom and the entry on the window. Using the grit, we will make something like a small program and will use the great in it. But we will know more details about the great enter. And you will use it after that to organize your window. But we will use the rows and columns so the begin and we will create the intrigue and the labelled in the button. And then I will create my function right there. So in my function, right there after print, I will write the name Asterix s and we will know why we are using this extra access right there too. Right there in the function we will right after a print reminder s and we will know why we are using this reminder s right there. Then we rolled slash in which gives me a new line. Then I will take the values that inside of the entry by get Let's try this practically guys . So at the beginning we were right. E one equals entry and we will give it the window which is master. We were created. Other ones were right e to equals entry and we will give it the window as well Which is master? Then we will give the great for the 1st 1 So we will write. A ones are great. We will give it the rose which is gonna be zero. And that means we will use the first draw and the column will be equal to one, which means that we will use the second column. And then in the next entry, we will write a two dot grid. We will give it the second row which is gonna have the value of one. And the sicking come as well. So once we run the code, you will find that we have two entries on the window. The 1st 1 we will find it in the first trial and the 2nd 1 you will find it in these second round. And both of the entries are in the second column and they will never appear in the different column until we put the label before them. Now let's go back to the code to create a label. So we were right label. We will give you the window, which is master, and then we will give it a text. So we were right name. And then we will give it the great till we will write grid and we will use only the roads. So we will write, throw equals Syria. Then we will create another label and we will give it the master as well as of the window. And then we will give it a text which is password, and we will give it the grid as well, which is gonna be only Rose also and is gonna be the second row. But now you will find that the entries have been moved to the second column and you will find that the label appeared in the first row and the other label appeared in the second round. So now let's go ahead to create our button. Well, right Bun. We will give it the master, which is our window, and we will give it a text which is gonna be quit, and then we will give it a comment to be common equals master that quit. So once you click on the button, it will quit the window and then we will give it the grid and the row will be number two. So we needed to be in the third row, so we will give it a value by two. And we wanted to be in the first column, so we will give it the value for the column by zero. So let's make another one, so we'll take it as a copy. Let's paste it here, and it's removed this coming from here and let's change this column to be one and let's change its text to be show now. Once you run, the Cody will find that the two buns that I created will be in third graf is the rise of the two bottles have the same values, but the 1st 1 is in the first column, and the 2nd 1 is the second car. Once you click on the first part and you will find that the winter will be close to. But the 2nd 1 I want that when I click on it to a print. What is inside the entry on the terminal. So I will create a function to connect them. So at the beginning, we will create a function. We will write death and we will give it a name, which is sharp entry. We were right print and we were writes. Reminder s after the name and we will write slash ends. So we will give it a new line and we will write password and then remained or s and we will know why we are right in days. Reminder s is right here. Now we will connect the bottom to the functions. So we will go right there in the button. And we were at the common to be equal to show entry. So now they are connected. So now that's from the coat. Once you run the code, if you click on show, you will find there the name and the password. The words themselves will be printed on the terminal and they are separated by a new line because of the slash end right there. So now I want to put values that will appear instead of those. Reminder s is right here now I want if I enter any value in the entry, whatever it is to be printed on the terminal instead of the remainder s is right here. So I will do this by the get that we will go right there and we will write Reminder and we will give the values that we want. So we were right. The ones get and etudes get which are the values of the entry. So now once I write anything inside of the entry, it will be printed instead of the Reminder s is right there. So now once you run the code and you click on show, you will find that nothing is printed instead of the values. Even the reminders ss are not there Now I'm taking the value from the entry itself. So if you go right there in the name and you write Ginter and you go to the password and you write any number and then you quick show, you will find that the values that you entered right there will be printed on the terminal , that we know how to connect between the function and the entry by get so it gets the values from the entries and we connected the function to the button. The once you click on the part and you will find that the function will be executed. I hope, guys, that you like the video and see you guys in the next videos. 18. What is the Frame: three guys this mahmoud reference. They will speak about the frame and that means how to create a frame two hour window. But the begin. We will create our winter and then we will add a frame by writing to take a dart frame. But then we will import the winter. Then we will give it the pack and we will add the conflict that we will add the height and the width and we will give them values right there. Then we will add the relief and then we will put burns inside of it. So we will create the barn and we will add it to our frame like the winter. Exactly. We will give our buttons bad in so it will leave spaces from all the sights. Then I will create another frame and I will add a new label. So you will find that its default and library to find the label frame right there. So you will create a frame and you will give it a title right there. But the beginning we will create our frame and we will give it a name. So we were right. Frame equals dedicated up frame, and we will give it the window which is root. And then we will write frame dark peck. So now we created our frames. We'll add our properties right here. So we were right framed our contract. But we will give it a hide by 200 we will give it a with by 400 then we will give it a relief. So we were right framed that conflict. So we were right relief and we will use, for example, the rich. So now let's check the frame though. As you see, you will find that the frame has been created on the window and it has all my configurations in there. Tight is 200 the with is 400. You will find other relief is using the rich. And we spoke about this before, so now we want to add a bond inside of it. So we were right to decayed up pun, and then we will invoke the frame right there as if we are put in the button inside a window and then we will add the text will be frame and then we will add dot pack. So let's run the code right now. So once you're on the code, you will find that the frame has disappeared and the buying is appearing right there. Why is that? Because I didn't give Pat into the frame. The bottom didn't appear inside of it. So now I will go ahead on her will give bad into the frame. So I will write Frame taught conflict and I will give it Cadden. And it will equal 50. And for example, 25. So now, once you run the code, you will find that the frame will be appearing again. And it left a bed and by their the 50 from the width and the 25 from the height so that we know how to make the Brian appear inside of our frame. And if we don't give bad into the frame, it will disappear in the bond will not be inside of it. So now we want to create another frame. But I want to connect it to a label. So now we will write to decayed up label frame. Then we will pass the route so the height will be 200 the width will be 400 right here and the text will be exactly my frame and we will add right here dot pack. So once you run the code, you will find that the frame has appeared in front of me and the label appeared right there as apart from the frame. So the frame and the label are now combined together. So we learned how to create a button to put it inside a frame, and we know how to connect the frame or to combine the frame with the label and how to change all the properties of the frame and how to add the pet into the frame as well. I hope, guys, that you like the video and see you in the next videos. 19. Prog and Scale: Hello, guys. This Mahmoud open today. Guys, before we start, I just want to tell you something that I'm so happy because of your feet backs about my courses right here. And I'm so happy because you are achieving so much progress based on what I'm introducing right here. And I'm so happy because you found it beneficial for real guys. You made my day and I hope you're the continuous progress and the continuous achievements. And I just want to tell you that if you want to get any hope, you will always find me right here. So today we'll speak about a progress par and this scale and how to conduct between them by the double bar. So at the beginning, we will create our progress part and we will give it the orientation to be horizontal. And we will give it a length value, which is the value of the length of the progress part itself. It's not even connected to the value right now. So before guys, we were determining the length of the progress power by its value. But now it's not gonna be like that Now. We will use the length and we will give it a specific length based on its value, as we said before, so it will be based on the value of the length. Then I will use the conflict to give it a value. So we will give it a maximum value to be 20 and we will give it value to be three. And this is the initial value from which the Progress bar will start. And here we have progress. Bird are start and that makes it started all the time. It gets from the first value until the last value keeps running and it repeats and so on. Then we will create our scale and we will use the same conflagrations. But its value will be connected by a method. So I will create a method that it's named value equal stop of our and it will be connected to my scale. So I will create a method that is named value and I will connected to the double bar. Then I will connect it to my scale. So I right that the value of the scale will be equal to the method because they will connect between this method and the Progress Bar and I used the set right here, Teoh said. An initial value once you open the scale. So let's try this practically guys. So at the begin and we will create our progress part so well, right? Prog equals TK that Progress bar and then we will pass the window and then we will use the orientation. So we were right. Orient equals horizontal. Then we will give it the length, which is gonna be 300. Then we will write the pack. So let's run the code. Once you're on, the Cody will find that the progress partner is right there on the window that doesn't have any values. It has the length off 300 but it doesn't contain any values in there. So now let's give it the values. So we will go over right there and we were right Prague dark conflict, and that we will give it the values. So we were right. Maximum equals 100 is the maximum value for the Progress bar and the value will be 25. So once you run the code, you would find that Progress bar is filled until the value 25 it's stopping right there. to now The value that I gave to the Progress Bar has been distributed over the 300 which is the length off the progress part. So what if I want the progress part to be stir running so I would go right there and they were right Prague dot Start, you will plan right here. So once you run the code, you will find that the progress power is running until the end from the initial value that we gave to it, which in the end, and once it reaches the end, it will go ahead from the beginning again to reach the end and so on. So now let's create the scale. So we will go right there. And we were right. Scale equals TK dot scale and we will pass the window and the orientation will be hers. You know, as the Progress Bar. Exactly. And that we will go right there to give it a length so the length will be equal to 250. Let's make it different right now, and let's give it the values. So we were right from 0.0 to 100 which is the same value of the Progress Bar. So now the scale has been created. So we need to write the pack and then let's check the coat. Okay. We forgot to write the underscore rate thereafter from as we said before, because from is a reserved words for the library. So now let's run the code. You will find that the scale has been appeared right there on the window. But it doesn't have any values and it started from zero. So now we want to connect it to the Progress Bar. So we will connected using the double bar. So we will create a method which is called double bar. So we were right. Value equals double bar. And then we will go right there in the value. And we were right. The variable equals value, which is the method that I have created. Now I want to connect the Progress bar to the method. But we were right proud conflict and we will write variable equals value. So now I connected the progress part to our method right there. So let's go ahead and check the results. So now both of the Progress bar and the scale are connected together. So the scales value is connected to the progress partner. Once the pro Kaspars changing, you will find that the scale is changing as well. So now the double bar connected both of them. It tells the scale of the value of the progress bar by the value of the scale changes as well. The scale is still running because the Progress Bar is running as well because of the start , which is proud of star. So let's stop it. And here we go. As you see, you will find that two values or the ball values of the scale and these progress par are still right there. They are not moving is now. The double var is in control and we have no values anymore because I stopped the progress part from running. So now let's put any value for the scale to make sure that both of them are connected. The progress par on the scale. So we were right that the scale that set and we will get a value by 50. So that's run the code and check it out so you will find that the value of the Progress Bar is still the same value of the scale just 50. So if I change the scare right now, you will find that the value of the Progress Bar is changing as well. So now we know what is the double bar and how to connect it to the skill hope guys, that you found this listen beneficial and two guys in the next videos. 20. Spinbox and Combox: Hello guys, is Muldrow from today will speak about this pin parks and become box How to add our values in them. So the beginning we will create our combo box and we will create the pack or well connected it to the pack. And then we will start to put our values inside of eight years in the conflict which are the months off the year. And as when you create a couple bucks, it's empty completely. So we have to have some values and we will add the year months right here we will use the Prince. So once we run the code, you will find that the value that we want is being printed. And we will use the set to put a specific value to the comfort box all the time. Even when I run it and a trees and other values. And every time I run it, it will chose this exact will you. We will give values to this pin box he was in from until two and four from we put under school right here, guys, because it's reserved already for the library. So we must put underscore and that I will use the pack and I will use the print. Okay, let's try this practically guys. But the begin and we will create our combo box with So we were right Combo equals combo box and we will give it this late the name of the window which is wrote. And then we will write combo the attack to put our combo box on our window to once around the code, you will find that we have the comfort box right here on the window. But as you see, it's completely empty. And once you open it, you will find that it's empty as well. It has no values at all. We will start to give it values using the conflict. So we will go ahead and we were right. Cambodia conflict. We will go ahead and we will write the value which is going to be the months of the year. So once you run the code, you will find that the camper boxes right there and it's empty from outside. But once you open it, you will find that the whole values that I gave to with inside of it, which are the months of the year. So now we want to put a specific value for the combo box when it's run. So once it's running, we will find this value right there on the combo box from the beginning. So we will go ahead and we will use the set. So we will go ahead and we will write Cambodia Set, and we will give it the value of Pheap, which is February. And once you open the combo box, you will find that February is already determined inside because it's the normal value that you will find all the time. Once year run the combo box on the window. Of course, you can set any other value instead of February. It's just an example, guys now that's created spin box. So we will go ahead and we'll write. Spin equals pen box, and we will give it the name of the window as well. So we were right wrote, and then we will write from and then forget the underscore guys because from is reserved for the library, as we said before. So we were right from 1990 2 2020 and we will add dark tech. But once you're on the code, you will find that this pin boxes right there. It's certain from 1990 that you increase the values as you want and even you can edit the value by yourself if you want to. Now I want once I run the code to print right there the month and the year. So I will go right there in the Campo and I will add print December and I will go in this pin box and I will write Print 2000 the once around the code you will find that December and 2000 will be printed right there in the terminal. So now we know how to career the combo box spin. Pakistan have to change their conflagrations and how to give them values, how to use the set and the print with them. I hope, guys, that you liked this video and see on the names, videos 21. Resize Tool: things Mama drove from today will speak about the resize. So the resize is responsible for a change in the size of the tools that we are using, like the photo and the label. So today we will change the size off the label using the scale, and we will use it to connect the label by the function that will change its size. And we will call it the resize function. So at the beginning, we will ride death resize Evan equals none. And then we'll change the configuration off the label. But the beginning we will create a label and we will talk about the film and the expand later guys to be clearer. And then we will change the foreground and the background. And then we will create this Kale and we will give it a value from 10 to 70. And we will know later. Why did we choose 70? And then I will know how to connect it to my function. So I will create my function and a well connected to the scale. So the scale will change the conflagrations off the label that I have. And then I will write. Quit equals buttons so I will use this problem to close this window. So let's try this practically so at the beginning we will create our label and we will give it a winter. It's our main window and we will give it a text or hello to cancer and then we will give it the pack. So we were right. Label the attack. We will get the scale so we will write scale eagles TK that scale and we will give it the window that we have. And then we will write the scale from 10 to 70. Or let's make it 100 to make it more obvious and more clear in the explanation why we are explaining and I will write a scale attack. Then we will create our bun and we will write. But on equal stick a dart pardon and we will give it the window. And then we will give it fixed, which is gonna be quit. And then we will give it the comment by quit. So we will close our window. One sweet quick on this part and then we will write. Quit that pat. Now let's run the code chicken. After we created the label on the scale and we created our button right here. So this Try this so you will find the label right there and then you will find the scale is right here. Exactly. Started from 10 to 70 and it didn't start from a specific value because we didn't give it a specific value to start from. So it's starting from the beginning, which is 10 in the bottom right here, which is quickly. So once I click on it, the window will be close to. So now I want to change the background and the full ground off the label. So I will go ahead and I will choose my label right there. So I will write labeled conflict and we will give it the foreground. So the foreground will be silver and the background. Let's make it brown. So once you round the code, you will find that the foreground of the label became silver and the background became brown. So now I want the label to take the whole window in the size. So I will give it the order, which is expend so we will go ahead and you're right. Label toe a pack and we will add to expand, and we will make it equal to one. So you won't find that the label is going to take the whole size of the window. So what if I want to change the whole height right here? So when I change the size, it will take the whole window in the size. So we will go right there. And we were right. Phil equals why? And that will give the label the whole height off the window. So what if we wanted label to take the whole window in the size? So that means we will create our function, which is responsible for a change in the size. So we will ride death resize, and we will give it thee Evan by none. Then we were right labelled configuration. We will change the phones off the word that we were right and we will right phones equals aerial. Then we will give it the value to be bold. Okay, so now I want to get the value that the scale will be determined with. So if I want to get the value that is being changed from 0 to 100 for example, crawl in the scale. So how would I get this value? So I will write personage scale don't get. And that means give me the value off the scale whatever it iss when we spoke about this before guys. So once you run the code and you try to change the size over the label, you will find that it's not being changed as well because we didn't connect the function that we created to the label yet. But we will go right there to the scale and we will write. Commons equals resize, and now we connected the scale to the function that we created. So now if I want to change the label size, I will just change this scale. And once I increase the scale, you will find that the size of the label is being expanded, and once you decrease it, you will find that its size is getting decreased again. So we will go back again to the code. And let's change the 100 to be 70. So once we get the end of the scale, you will find that the size of the label, it's exactly suitable toe the size of the window. But it's recap At the beginning, we created the label and we created the barn and we were created the skill. And then I created this part that when I click on it will close the window for May. Then I changed the phones and the shape of the label that I connected the label to the scale. So once I increased the scale, they will find that the size of the label is being increased as well. And once the decree city will find that the size is being decreased as well. I hope, guys, that you like the listen and see you in the next videos. 22. Shortcut in keyboard: Woodrow for today will speak about the keyboard shortcuts. So at the beginning we will create a function and we will give it an action right here. So the action means whatever I give to the function as an order, it will be executed. And then I will print the action. So whatever I order the function to do as a print or copy or whatever, it will be printed on the terminal. And then we will use the Lambda, which allows me to execute a specific comment so we will use it. Ti executed the shortcut over the winter. So we were right window that bend and we were right. Control C control V or any letter that you like them, that you will give it this similar right here, which is a and then give it a shortcut, which is a copy paste, save or cut. So it's try this practically and it will be more simple. So at the beginning will create a function which is death shortcut, and we will give it an action. Then I will print action and we were right window that bend, and that would allow me to create the Lambda and everything on all the orders inside of it to execute it. And we will write the short guy that we want, which is like control Dash C. Then we will write blamed them and we will give it a simple which is gonna be like a And then we will give it the comments, which is gonna be copy so it will be printed in the terminal. So let's run the coat. And once you press control, say you will find that copy is gonna be printed on the terminal. So the common that I wanted to execute by using a shortcut, it has been already executed. So let's try to create more. So we will take us as a couple and let's paste it. Okay, the 2nd 1 is gonna be pace too. So lets me control the The 3rd 1 is gonna be cut. The last one is gonna be saver. So let's make a control s. And we would have changed its name to be paste and let's make it cut, and it's gonna be safe. So right now, let's go to run the code and let's check if it's gonna be executed or not, though, once you press controlled, say, on the cable Ready will find that copy is gonna be a printed in the terminal. Then control V is gonna be paste and control. See, cut control s saver. So now we learned how to execute the shortcuts over our window. So we created a function. We added the word that we won't execute after this instead of the action in the function like a copy, save or paste be added a short car that we want By using the cable we created the Lambda and we give it a simple And then we added the function use in print. So help guys that you found the listen was beneficial. And I will see you guys in the next videos. 23. Label with Image: Boudreau friends. They will speak about the label and the image and have to merge them. So the beginning we will create a label. We will change its color and the phones and the size of the fund. Then they will use the rap length to leave a space between the lines then we will use to justify, and this will make it easier for us, and we will know more about it in the explanation. Then we will add an image to the label. And then we will use something that is called the compound and that allows me to put the image in the left, the right or in the center of the image. So let's try this practically so at the beginning we will create our label. So we will write, people cools dedicada label and we will give it window. You will give it a text which is hollow to cantor. Then we will give it a pack. So once you run the code, you will find that the label is in front of you on the window and we will change its color . So we were right label dot conflict and then we will give it a foreground by silver and a background by brown. So once you run the code, you will find that the color off the label itself changed. So you will find that the phone color became silver and you will find that the color of the background became brown. So let's change the size off the phones, so we will change the shape of the phone so we will give it a tie by area and let's check it so you will find that the phone is changing right here. Let's give it a phone size by 20 and it's make it bold. So once around, the Cody will find that the shape of the phone changed. You will find that the color changed, and you will find that besides changed as well. So what if I want to leave a space between hello and to Kinter to make it in different rows , So I will use the rap length so I will go ahead and we'll write labelled up constant. And if I want to change anything or did anything. The conflagration. We always use conflicts, so label dark conflict equals rare planes will give it value by 100. And if you check the Cody or if you executed, you will find that how that became an online and cancer became in the other line. So what if I want to get hello in the middle or in the center So we will go ahead and we will use justify So we were right. Just five equals center. And once you finish this, you will find that hello became right exactly in the center. But if I want to put it on the right so I will change the value to be right. But find that the word became on the right. So it was in the center and it became on the right. Once you changed the value of justify so the suitable things going to be in the middle. So we're going to leave it in the center so and now I want to add a photo so I will go ahead and you will create a new method and we call it logo equals photo image. And then we will add the name of the image that we want to add. And the images existed in the same file or in the same folder where I am working. That means that the file off code and the image are in the same folder. So I will write the name which is python sick. Enter the G I f. So you must add the extension. And we said that before. So now I want to add this image on the label. So we were right labelled that conflict and we will write image equals logo. And that means that we will import our method and of course, what's inside of it. So runs three around the code. You will find the images appear in front of you on the label. Exactly. So now I want to make the label appear again because it's right there beneath the image. So I will go again. You know, we will use the compound, so I will go ahead anyway, right? Label that conflict and we will give it the compound by the value off center. You will find that the word that became on the image right here. So if I want to give the image in the right or the left off the label so I will go right there. And they were right in the code. If I wanted to be on the left. I will go ahead and I will change it to be left. In both cases, you will find that the image is a change in the both sides of the label, and every time you're on the code, you won't find that the position of the image on the label are in changing. So let's recap. At the beginning we created a label and we changed the color of the label itself. Then we change the phones shape, and we changed the phone size and the bones chaff to be bold. Then we used the Rep Linz to put every word in a line, and we used to justify to put our words right here in the center. Then I created a new method, which is logo, and I imported that the picture inside of it that we want to use. And then we connected the image that we imported to the label. And then we used the compound and we used the right the left in disinter. I hope guys, that you understood everything and see you in the names, videos 24. how to create RadioButton: Theo is Mahmoud reopens. They will speak about the radio button we will connected to a function using which we can change the color of our widget. First of all, we will create the winter and we will create the radio pardon using the TK and we will use the window text. We will use the variable, the value and the comment. So at the beginning we will create free ready buttons and then we will create the end for So we spoke before about DeVore and we said that we have and it's more strength bar and double var using which we can connect between a function and a tool so we can make a connection between the tool and function years in the var family. So we will create the method of the environ. We will connected to the Roddy Button using the variable. Then we will create our function and let's give it any name which is gonna be here. Aresco can give it any name that you want. So we will use the red cell and we will give it a member which is gonna be 12 or three or four. And we can just give each of them the conflagration that we want. And we can even change the background as we want, like the gold or red or whatever. So that's try this practically to make everything simpler. So at the beginning, we will create our radio button. So we will write, read one. So read one equals take a dot radio bottom and let's give it the window and the text is gonna be blue. Then we're gonna add a gret. So we will write, read one dot grid and we will give it the columns equals zero, and the roves equals zero as well. So we want exactly the ready bottom to be in the first column and the first row. So in this way, I created the ruddy bottom that we want. So now I want to create the war. So I will write that our message is gonna be the in it for So we were right. Red var equals t k dot and Advil or now I created my message and I want to connect it to my radio button years in the variable. So I will write variable equals red for so I connected between the radio button and the method which is going to be in and far right here. So now let's create the function which we will use to change the color of the window. So we will write death and we will give it a name which is gonna be here. Resco. Then we will write Threat cell equals red bar Don't get And that means we want to get the values which is inside the red bar. Now I connected between the function and the myth it So now I will write. If so, then I will write f Red Cell equals one. Change the configuration of the window So we will add window dark conflict, background and we will give it a value by blue. No, nothing will be executed because we need to connect the ruddy bottom to our function. So we will write that the value equals what and it's connected. The already burdened by the functions. So we will write comments equals red Co and it's erased those practice right here. Two No way connected the radio button to the method using the variable, and I connected the ready. But in using the comment to the function right here and I made the red cell to be one. So that means if the red cell equals one, change the color of the window. I connected this to the ready bun. So let's try this and let's see what's gonna happen. So if you up in the window right here, you will find that the ruddy buttons right there. If you click on it, you will find that the background of the whole window will change to be blue. So the function has been executed using the radio bottom two. Once you click on the ready button every time, you will find that the background of the window is changing into blue. So let's try to create another one. So let's take this radio button right here as a cubby and let's face it right there and let's change the names. The 2nd 1 is gonna be, too, and the 3rd 1 is gonna be three. And let's change the cutters. Thes second one's gonna be gold in. The last one is gonna be Rhett. So then keep the variable as it is. And then we will change the value to pay two and three for the other two Brady Bonds, and we will know why, after this becoming is still the same. So now let's change the Rose because we don't want them to be stacked over each other. So the second radio button is gonna be in the second row, and the last radio button is gonna be in the third row. But in the second and third radio buttons, we will use the ale if and before the values. We will change the 2nd 1 to be, too, and they just want to be three. So we connect between the radio buttons and between those Smith is right here using the values. So let's go ahead and let's train to the cutters right there. So the 2nd 1 is gonna be gold in the last one is gonna be read. So let's execute this code and let's Trickett. So once you're on the court, you will find the three D bartender in front of years. So once you click on anybody, you will find that the background is a changing according to the radio button that you are clicking on. But now we knew how to create a function and how to greet a ready button and how to connect between but of them using the word war, the weather at the end of our we cannot execute the code because the involvement things that coming from the function and it passes there to the radio button so it will be executed on the window. So I hope guys that you like the video and thinking so much, see in the next videos. 25. Color on widget: thermometer offended, able to speak about the color on our window, so we will divide our window and we will create the color or we will make the color use in the frame. So we will divided into three parts to a bar, the middle and the bottom. So the begin and we will do this using the frame. So we will create three frames and we will draw them on the window and we will give them the background and the height, and we can use the relief with them. Then I will make them appear on the window using the pack. Then I will use something that is called the side, and the side is responsible for the position off my frame, whether if it's in the top, in the middle or in the bottom, we will use the fill that I use over time with the X and y. So the ex takes the color through the width and the white takes the cutter through the height of the window, and we have the expanded that makes our color be in the whole winter. So let's try this practically the beginning. I will create a frame bull right frame toolbar equals a frame. We will give it the route and we will give it a background. And let's give it a height, which is going to be 70 and then we will give it the peck and that, we're aware, were to be on the window. But it's run the code and a check it out. Once you run the code, you will find that the color that we have right here, which is read it appeared on the window and it took exactly 70 from the height. At the same time, I wanted to take the whole width and to do that I have to use the fill. So as we are using the Phil and we use with the X and y so we were right X to use it for the width. And once you run the code right now, you will find that the color took the whole wet off the window and I have to determine the side because we will use another frame. So we were right Side equals top. Don't stay. The first frame is a copy, and let's put it again right here to make another one. It's changed the name to be bottom and let's change the color to be green and it's changed the higher to be 20 and now let's give it a pack to make it appear on the window. So we were right brain button the pack and we will feel by X. So let's try right now the code to check if it's running properly or not, so you will find that the second frame took exactly the place. After the 1st 1 you will find that it's grayness taken 20 from the height and it's taken the whole width of the winter. So what if I want to make it in the position, which is gonna be down, But to put it on the bottom, we will go right there in the code and we will add the side to be bottom. And once you run the card again, you will find that the frame became right there, down or in the bottom of the window. But as you see, you will find that the second frame became right there in the bottom. So now I will create another one. So what? We will take one of the frames as a copy and let's write it here as 1/3 frame. Okay, we will give it a name to be the middle. We will give it a color to be blue, and we will give it a high to be 250. So let's give it a pack. We will go right there to give it a pack. You're right. Frame middle, not pack. We will give it a side to be top and the sale value will be both. We want to take the height and width together. So once you run the code, you will find that it took the whole with the cutter is blue and once we had expand, you will find that it will be taken the whole height as well. So once we go back to the code to write, expand equals Yes, you will find that the frame is taken the whole area in the middle by height and with so you will find that none of the three frames are right there and the 2nd 1 is in the middle and it's expanded to take the whole weight and the whole height as well. But now it's recap. The first frame took the height of 50 and the color was red and we gave it aside by top and the other frame, which is in the bottom. We gave it aside by the bottom sorts right there and the 3rd 1 It's in the middle, and we give it aside to be taught by the expand. It took the whole size off the window right there in the middle, and the Phil took the value of both. I hope, guys, that you understood everything and see you endings videos. 26. Number and callback: Muldrow from today will speak about the number and the callback is at the beginning. We will create a function which is gonna be deaf Colback and we will give it a number and we will print the number that we gave to the function will create about it and we will give it the attributes that we want to give it to it. And then we will have that Linda and we spoke before about the Lambo guys. Then we will give truncheon co back to the Lambda and we will add a real number instead of the word number right there. We want to print and then we were right dot pack. So let's try this practically so at the beginning we will create functions. So we were right deaf Colback number and we were right print number and it is my function here. OK, then we will go ahead and we will create our buns till we were right TK That button, we will give it the window. Then we will give it a text and it's right, for example, quick me. Then we will give it a comment. We were right in the Kermit call back and we will give it a number, which is gonna be one. And at the end, we will write dot packed to add it to the window. So let's run the code right here to check what's gonna happen. So in the bond, which is click may we added the common cold back. So once we click on the button, the number that we gave to the Colback will be printed. So once you click on the button, you will find that the number one is being printed in the terminal. Okay, so let's create more than one fun. It's stick to that. This as a copy and we will create other four buttons right here. The 2nd 1 is gonna be to the 3rd 1 is gonna be free. The force is gonna be four. And the last one is gonna be fire. Once you click on everybody, you will find that the number which is a scientist Everybody is being printed Empty terminal right here like the 1st 1 is gonna be one. The 2nd 1 is gonna be to 3rd 1 3/4 1 who are in the last one is gonna be five. So let's recap So at the beginning we created a function and we called it the Colback, and we gave it a number and we said, Print this number. Then we created the button and we added the attributes of the button. And then we added the common right there to tell the bar on what should be executed once you click on it. Then we added the in function call back to the button, and we added a number instead of the number which is gonna be one or two or 345 whatever it is. So once you click on the button, you will find that it's gonna be printed in the terminal. You will find that once you click on the button, you will find that it's appearing on the terminal. So I hope guys that you like the lessons and see you in the next videos. 27. Messagebox​ , Filedialog​ , Colorchooser​: I think my Madre open today will speak about three things The message box, the fire dialogue and the color chooser. But the begin and I will create a message box and I will write message box Don't show info And here I will write the message that will appear to the user Whatever it ISS give it the title When I give it the contents of the message by message and I will write print message box toe ask question So I will ask the user for example What do you want? But I do you want to open a file or save file what everyone identifier dialogue will appear If he chooses to open a specific file I will create a method of file dialog asked open file to the fire Dialogue will be opened and he will choose the five that he wants from the PC. Then I will write print file name dot name But it will print the extension of the file that I will choose. So what if I want to choose a specific color? Our message box. So here I will open the color chooser for the user and he will choose the color that he wants and by the initial color allows me to choose a specific color to be the default one. When the user opens the color Children. So whatever the color that I want to suggest, I would suggest it years in the initial color. So let's try this practically. But at the beginning I will import the library and then I will import the message box. Then I will write message box dot show, and so and they will give it a title which has python. And then I will give it a message. And I were writing it Hello to Kenter. So Okay, once you run the code, you will find that this message would appear in front of you. The title of the message is Python, and the content is hello to Kinter. So I want once I click on OK message with a beer for May toe open a specific file. So I will write print message books, Duck, ask question and I will give it a title. And I will type for example, while do you want. And that is the message that will appear. What's a click on? OK, so now I want to print a question or a specific statement. So I will write. Do you want to open a file? So now, once you run the code, you will find that the same message will appear on once you click on. OK, you will find this dialogue is in front of you. The issue. What do you want? Do you want to open a file once he quick Yes, we want to up in the file dialog. Right. So we will import the file day about now. So from Tick Inter Import filed a look And now I will create a method which is file name equals fired l A don't ask open file. And that will allow me to ask the user to up in a specific file from his device once he clicks on Yes, in the previous message. Then I will add in the next line print, final name, that name and that allows me to print the extension of the file that I will use were up. So Ok, let's try this. Once you run the card, you will find that the first message will appear or cyclic on. Okay, you will find that the other message will appear like Do you want to open a file? We will click. Yes. So it will open a file dialog for you and you can choose any file that you want from your device. So once you choose any file and you click open, you will find that the extension or the location off the fire will be printed on the terminal. Right here. So now I want to up in the color chooser So I will write from decanter imports color chooser. Then I will write in the next line Print color chooser dot s color So now once you run the coda and you go through the messages and you quake, okay. And yes, you will find that the color chooser will open in front of you so the user can choose any color that he wants. So I'm CIA Choose any color that you want and you click on OK you will find that the name or the code of the color will be printed on the terminal If I want a specific color to be appear in front of May Once I opened the color chooser so I will use the initial color so I will write the code and that's running. So once you up in the color chooser for the second time, you will find that the color white is Theo initial color right here because I determine it in the code. Now we know what is the color chooser, the file dialog and the message box. I hope, guys, that you'd like decision and see you in the next video. 28. Text Box Widget: Hello guys, is Mama drove in today? In our video, it's gonna be like a religion. So we will connect all the tools that we took before in a simplified and a special way, and that will teach us how to draw the idea of our program and how to drove it exactly as it's in our imagination on the window. So at the beginning, we will speak about the text box widget. So at the beginning, guys, we said, like how to create a label about an entry so today will connect all of them to a function and that will simplify the next sessions for us. But we will connect that to the function by the entry. No said before that this connection is gonna happen by the string bar because it takes the value from the entry and it passes it to the function. And in this way we are connecting the function to our bottom. So let's go ahead and check this practically so just a safe time, Guys, I created the button, the label and the entry before once around the code guys, you will find that this is our label and it's in the first column and the first draw. Then we created an entry, and we put it in the first column in the second round. Then we added a button, and we did the column by the index one and the raw by the index one. And that means is gonna be in the second column and in the second row. So now I want to connect all of them. So once I write any word inside the entry and I click on the button, value of the entry will be print on the button. So, for example, if I am right in hello and that will be on the button already. So once I write anything in the entry and click on the button, you will find that the value of the entry is being added next to word that is on the button already, For example, like hello to Kinter. Hello, Python. Hello, world. Whatever we want. Let's see. How would we create this? That the beginning? We will create our string bar so we will create our method, which is gonna be name equals t k dot string bar. And we will connected to the entry. As we said before by the text variable. So we will write text variable equals name Now we connected the string Barto the entry. So now we will create our functions. So we were right. Death Click me and we will change the conflagrations of the buttons. So we were right. But, um that configure and take care Because we right can figure not conflict. Because now we are dealing with a function. Then we will add a text. So we're right. For example text equals hello and we will leave a space. And I will tell you what is the benefit of this space right here. Then I will write plus the name of our method dot Get so now impasse in the value of the entry for the function to Burian. Besides, Hello. Let's remove the space so we will make difference between the two conflagrations the space and without Then they will take those configurations right there to make the new configurations appear on the old button. So now if I apply this cold, is it gonna be executed correctly? So I will give you guys 10 seconds to check out if it's running. Okay or not. Okay, though, if you discovered what we're missing right here. But that means you did a great job using the last videos if you didn't discover that. So it's okay. We're just making a revision, guys, it's all about learning right now. We must connect between the button and the function, so I will be able to execute it, and that will be happening by the comment. So I will write. Calmund equals Quick May. So let's run the code. Once you're on the go, you will find that this is our window. If you go to the entry and you're right, any word like the cantor. So once you go ahead and click on the button, you will find that the text will be transformed to be hello to cancer, and you will find that there is no space between the two words. And there's the benefit of the space that we said that we will use it the beginning after her loaded rhetoric. So it's at a space and let's check the result again. So let's try to cancer, and when you click on the button, you will find that it left the space now so you will find that there is hello to Kinter on the button. But there's a space between hello and Tick Inter to know we know how to connect between our plan and our function and how to give it a name or a word that will be added the button in addition to the world that will be written inside the interest. So that was just simple that you and all we did that the recreated function. And we added a value by our own buzz, the value that will be written inside the entry, whatever it is, I hope, guys, that you like the video and see you in the next failures you. 29. Combobox with button: guys, This mama drove and today will speak about the comfort box and how to connect it to the park so that the entry of the combo box will appear in the button. So the begin and I will create a label and that I will create the string of irony well connected to the combo box. Then we will give it a with by 12 and then we will connected to the string far by the string variable. Then I would give it the value that I want to give it to it. So I will write the name of the camp a box and then I will write that value. And then I will add the values that I want to add whatever it ISS. So I want to add one value to values three for whatever I want. Well at them right here. And by using the current, that means I will use a specific value to be the random or the default value wants a open the combo box. Then I will add it by the great and I will connected to the function. So there is a difference between their session and the previous session in the previous session. We use the great for the burn and it waas 30 for it. But this time we will use the great and we will make the columns equal one. And we will. Could the combo box instead of the button at the same place? So now in the function, How would I connect it? So after right in Hello, I added the string bar of the entry. So I wrote named out Get. And then I added a space between the value of the comfort box and the entry. Then I will add number to get, which is the method of the Cumbre box of the string bar. So let's try this practically. This is the last coat that we made, so we will put it in order a little bit. So let's get it down a little bit. And then let's create our combo box. So we were right. Medicaid, not label. We will give it a text and let's call it, for example, choose a number. We will give it a grade and we will put it in the second column and in the first row. So we will give the column a value by one and the role will take a value by zero. So once you around the code, you would find that the label is existent in the second column in the first row. Okay, So once we create the combo box, we need this pardon to be in the third. So let us first create become the box. So the begin and we will create the method of the string bar. So we were right number. So the string virus existed in the group off the TK Because we have two groups the group of the TK and the group of the T t k the string virus existen in the TK Group DTK contains something like labels the entries, the buttons and sore but the end of our this string var and the double var and so on the our existence in the tea cake. So we were right string for And then let's go to write number chosen that equals T decades are combo box. We will put it on the window but we will give it a with by 12 and we will give it a text variable by number. Let's give it the values. So we were right number chosen value. And let's give it values like 1 to 4 42 100. And it's given the great so well, right number chosen dot grid, and we will give it the value of the second column and the first truck. So we will give the column value by one and the rose by zero. So you're not just that it's appearing right here, but the button will be appearing on it, so we need to move this pattern from here. We will put the button in the column number three. So once you run the code, you will find that the button has been moved to the column number three. Once you click on it, you will find that it will move to the second column because in the function here, I connected it to the column number two, not the common number three. But I will need to delay this line from the function, and we will keep it fixed. In the third column, the ones I executed my function. It will not move tonight. We want to connect my combo box to the function, so I want the values of the combo box to be appearing by the button. So we were right plus number get which is my method that I created before. So now let's from the code and check it out. So once you go to the entry in rights Cantor, for example, and then you choose any value for example, which is 100 by the combo box. And then you go to click on the button, you will find that the value of the Cumbre box will be transferred on the baton. So right here on the bottom, you will find hello occurred into the first entry and then it added the second entry, which is the value of the combo box at the end and in the middle, it added, take inter. So what if I want to add a space between the entry and the number, So I will go right there and this Ryan and I will add Plus and I will live a space between signal quotations. Then I will run the coat once it like anything, or you write anything right here like python, and then choose any value like 100 from the combo box and then you click on the button so you won't find a space between the combo box value and they entry value. Now, when I around the code, you will find that the combo box doesn't have any value. So now I want to have an initial value that will be stable right there or fixed right there . The combo box Once I run the coat, so I will go there. And they were right number chosen that current and I will now treat everything by rows and columns. So how would I do that? You will find the values are standing by zero, which is being treated by the index. The first index that we have a zero. So it goes like 01234 and so on. So if we want to have 42 for example, this value, it's gonna be the fourth value. Right? So we were right. Three, According to the index which stands or stars by zero. And once you run the code, you will find right there. The initial value of the Cumbre box is 42. So if you go the first entry on your right to enter and then we have 42 already chosen in the combo box. So once you click on the button, you will find that it's written. Hello, Kenter 42. But as you see, we created our combo box. We give it the values by value. He was the current to use any value from inside the combo box to be the initial value. Once you're on the code, we knew how to transfer the baton to be in the third column that to be appearing on our combo box. But values. We added the function and we put a space between the two entries, and decode has been executed in the right way. And perfectly, I hope, guys that you like the session and see you in the next videos. 30. Checkbuttons in tkinter: Hello guys is more drove in today will speak about the check buttons and how to added to our winter in a very special way. And we will speak about the whole states off the check pounds today. But we will create three chick buttons. The first state of the first trick button's gonna be disabled. We will change it by the state and we will give it so late. And the mission over the task of the select is so I opened the window. You will find that the check Barton is marked by a tick and as well I can used to select toe un select this checkpoint and then we will use the great to put all of them in order. In the 2nd 1 will be by the select and the 3rd 1 will be by select. So let's add this to our code and check it out practically so at the beginning. This is about the previous session we spoke about the entry under combo box and how to add both of them in the same function today will speak about our chick button. So we were right. Check one equals TK That check bone then we will give it the winter and the text will be by disabled and the state will be disabled as well. Then we will market by default by type and select. So we were right. Check one duck select. Then we will add the grid. So we will write a check. One dark grid, so we will give it the column, which is the first column. So we will give it zero and third row, which is going to take the value off to as we are giving the values to the columns of the rose by your index guys. Once you run the code, you will find that the chick button is right there, appearing in the first column and the third row, and its state is disabled, so you cannot control it, and we gave it a select. So once it appears in front of you, you will find that it selected already. So now let's create another one. So let's take the 1st 1 as a copy and let's duplicated right here to make two. So let's straight their names and let's change all of them. So the 1st 1 it's one as it is, the 2nd 1 is gonna be, too. And the last one's gonna be three. Then we're gonna change the columns. So the 2nd 1 will take the column by the index one and the other one will take become of the index to so all of them will be ordered by each other. So we will remove the state from all of them the 2nd 1 and 3rd 1 and then we Let's change the 2nd 1 to be dis elect. So let's check that once you run the code, you will find that all of them are appearing by each other. The 1st 1 is disabled. The 2nd 1 and 3rd 1 are enabled. The 2nd 1 is taking the state of the select, so you will find that it's not marked at all. And 3rd 1 you will find that it's selected and it's enabled at the same time. So you will find that it's marked. And as you see, each one is a different column to now we know how to create our chick button. Have to put it in order in the window, how to place it exactly where we want and how to make its state to be disabled or select and desolate. Today we knew how to put him in order in a special way. And we know all the states of the checkpoint help guys that you like this session and see you in the next videos. 31. Scrolledtext in tkinter: Hello, guys. This mama drove today will speak about the scroll Text the scroll Texas not existent in the TK group or the T Take a group. So we important by typing from two Kinter import scroll text. So to write it down on the window, we need to write scroll text doctors crawl text by the first as his lower case and the 2nd 1 is upper case. Then I will add it to the winter. But this time we will use the width and the height in a different way. But we were right Down Scroll zebu equals 30 and scroll H equals 10. Of course, W stands for with and H stands for height And then I will add them right here by the width and the height. Then I will use rap and rap allows me once I'm writing on a line and I reached the end of the line. So I will go to the next line automatically so it keeps the determines with for May without exceeding it. Then I will use something that is called columns Pan. And instead of put in the scroll text in one column, it puts it for me in three columns. So let's go try this practically So this is the code of the last listen, So we will go right there and we will import the scroll texts. We will write from tick Inter Imports, Crawl text. Then I will write down scroll equals scroll text dot scroll text and we will give it the winter. Then, in the next line, we will go to create the great that we were right scrolled up grit and we will give it the columns so we will put it in the first column, though the columns value will be zero and we will put it in the third row. And this is the most suitable solution for this. But let's run the cotton that's check it out. So, as you see, there's a scroll text that I created, but I didn't give it a width or height. So this is the default with and the default height of this cruel text. So it took the first column completely, though by using the column span, we will put it in three different columns. So let's first give it away pain height. So we were right scroll w equals 30. That means the width is 30 and let's right scroll H equals 10 for example, which means thehyperfix 10. Then we will pass these values to our scrolled text, so we were right with equals. Scrolled W and height equals Scroll eight. So let's run the code. Once you're running, you will find that the new weight and the new high determined the width and the height of the scroll text. But it's still right there at the first column, so we wanted to be in three columns so the rest of the tools will be organized on the window and the shape of the window will be so suitable. So we'll write. The column span equals three, so you will find that it told the three columns. The rest of the tools are organized in the previous case, but I determined in the past, for even I add the scroll text. So now I can write anything in the scroll text, so let's give it the right so I will write Wrap equals TK that word. So you will find that we can control the scroll text right now, and we can go up and down as we want told It's recap today was broke about this girl text, how to imported, how to determine the width and the height for it a different way and how to determine the rap. And while we are use in the rap, give it columns and rows and we talked about the column span and how to add my tool in different columns. I hope guys, that you like to listen and see you in the next videos. 32. Label Frame: three guys this mama drove from today will speak about the label frame. It's not the first time for a cigarette a label frame, but today we will create it inside the winter. We will give it a column. Spain. So it will be appearing on my three columns. Then I will create two labels to put it inside my frame. And then I want to control the areas of the label inside the frame so the label frame will have in a normal tad y. But what's inside the label frame should have pad y and products that will be happening using the wind. Four Children who write fold child in frame dot windfall Children. And then I will say that this child, the great configure, equals products and the pad. Why that I will determine that means I am controlling the paddocks and the pad wife for every child. But it's tried this practically to make it more simplified. So at the beginning, this is the code off. The last time we will create our label frame at first too well, right frame equals TK the label frame, and then we will put it on the window and Then we will give it a text to call it my frame, and then we will give it a great So we were right framed grit and we will not give it a column, so we will give it a column spend. So we were right. The rock pools five. And then the column span will be equal to three because they have three columns do now. If I run the code, nothing will appear for me because it didn't create the label that will be inside. But now I will write to dedicate that label, and then I will put all of this inside the frame that we will give it the frame, and then we will write the text to be, for example, labels in a frame, and then we will give it the grit. So we will give it the column to be equal to zero, and the role will be equal to zero. And then we will create another label and let's give it a different text. So we were right. This is a simple app, and we will change its rows so it will be in the second round. So let's check the results once you're on the card, you won't find that this is my level frame and I put inside it to the two labels that I created to know the label frame. I didn't give it a pad wise because it's right there under the scroll text, as you see, So it's obvious. So now I want to give it a pared y so we will go right there. And we were right in the code pad Y equals 20. So as you see, it left a space from the upside and from the bottom. So now I want to control the pad y in the pad x of the labels and inside the frame itself, like inside the frame. I want to control those spaces from the upside from the bottom, from the right from the left. So we will go right there. And we were right from child in frame duck window, Children. Then I will go right there. And they were right, child Duck great conficker and will remove the underscore from there. Then inside the conficker, I will add my paddocks and my pad. What though I will go right there and I will write paddocks equals 30 for example. So let's go to change us. You will find that it lifts from the right and the left 30 inside the label frame. So for the pad Y, we will go right there and we will write 20. You will find that it left from the upside 20 and from the bottom 20. So now we know to control a label frame. How to give it a pared y over our window or how to give the label that we created inside of it. Pared y in Pet X is in the 14 Children. I hope, guys, that you like this video and see you guys in the next video. 33. How to create MenuBar: three guys this mama drove in today will speak about the menu bar and how to Adam, a new part of our program. As you see in front of you, this is the menu bar, and I added the file and the help. Once I click on file, you'll find that we have save and exit as the rest of the programs. So we will know how to do this today. So this is our code, and we will know at the beginning that we will import our menu. Then we will create a woman, you par and then by the conflict. We will add it to the window. We will create a file and the help and we will write file name equals many by the cascade. We will add it to our bar. No right label equals file and then the menu equals file name. Then by the comment, I will add a label inside this file so that I will write file named at comment. And then I will get the label which is gonna be new. And right there I added another one which is exit, and I give it the common to be quick that separator is a line that I put between my labels . Then by the menu bar. I added a cascade, which is help right here. As you see, he created this functions, to write it or to print it Once a click on it, let's try this practically so the begin and we will import our menu bar. We will write from Take Inter Import many a bill, create our Manu Par so we will write Menu Bar Schools menu and we will give it the winter. And then we will write Window Dark Conflict to put it on the winter. And then we will write many U equals the menu bar that we created. And then I will write file name, then menu, and I will add it on the menu bar, not the window itself. And by the Cascade they were right when you borrowed up, Add Cascade all right, label equals file, and then I will ride. The menu equals the final name. So once you're on the card, you will find that the menu bar has been created on the window and the file has been added to it. And once I run the code and once I click on file, I want to get some options inside of it like, for example, new and exit. So let's do that that we want to add options inside the final name itself. So we were working on the file name, so I will add a label inside of it. So we will write, file, name the ad comment and we will add a label which is named new. So, no, Once you click on the file, you will find the label new. So now let's add another label. So we were right file name that had comment, and we will give it another label, which is called Exit, and we will give it a common which has quit toe. Once a click on it, it will close the window for May. So let's try this. Don't know. Once you run the code and you get from Kyle exit, it will close our window to know if you check the options of the file, you will find that they are so close to each other. So now we want to separate between them by alliance. So I will use the separator between them. I will write file, name the ad separator to know once around the Cody will find that there is a line that has been added between the new and the exit options. So let's add help. So we will go ahead and we will write Menu Bardot. Add Cascade because I want help to be probably the file outside. So we'll give it a label, which is named help. But what? Once you're on the go, you will find that it appeared right there outside by file. So now I will give it a function. So once I click on it, it will excuse that function. I will go to Korea, the function. I will write death help and then inside of it, I will write print. So I will write hello and then slash. And to get a new line and I will write, what do you need? And then right there in help, I will give it a comment which is equal to the function as we learned before dinner. Once you run the code and you click on help, you will find that on the terminal. Hello. Why do you need will be printed? So now we know how to create our menu. bar have to add a label on it. And once you click on a label on that menu part, it will make some options appear in front of me as safe as as new as exit. Then we understood how to create a menu bar. What is the mission or the task of the Cascade? Was the task off the separator? And what's the desk of the comment? I hope guys, that you like this video and to you guys in the next believes. 34. What is the Canvas: I had a guy this mama drove from today will speak about the canvas, the whole task of the canvases that it's being used to draw on our winter. We can use it to draw on our window whatever we want, like a tangle of harbor where we can even use it. Teoh paint on our window so we can use it to add that the counters as well. So at the beginning it's created canvas. So we were right. Canvas equals canvas and then we will give it the route and we will give it a with and height, the width is gonna be 300 the heart is going to be 300 as well and the background is gonna be green. So now it's all said, but we need to add the pack. So we were right canter start pack so that it will be added to the window. So let's run the code and check it out. So, as you say, this is our window. The width and the height of our window is 300 the compass is well is 300 by 300 so that it took the whole size of the window and the color green is the background of the winter right now. So if we go to the code to change the height to be 250 you will find that it will leave 50 down there and it will take 250 only from the height. So now what if I want to create a rectangle or if I want to create a circle, for example? So I will go right here and I will write r equals canvas and our stands for rectangle, for sure. So we were right canvas that create rectangle and then we will give it the height and the width and the place where it's will appear. But here it will be different. Oh, bit from the wet, sandy hide normally and we will know why. But now let's get the dimensions first. So we will write 30 0 100 and 100 and we will add color to the rectangle using Phil, and we will make it equal to blue. So let's run the coat, check it out. So, as you see, this is our rectangle I given that I mentioned. So how did I do that. So, as you see right there on the top left corner, you will find that we started from this point and we said that we need to leave 30 from the witch and we need to start from the beginning of the height and the other one right there in the rights bottom corner. We just determined the x and y to be 100. So now I'm determining the dimensions of the rectangle by using the tub left corner and the right bottom corner. So if we go right there to the why and we change it and the code to be 20 for example so you will find that the height became less and you will find that the size of the rectangle became best as well. So now I'm chosen. How the size of the return Google bait. So I can change that height simply. What if I want to change the width right here and to make it different, So I will go right there and a change they mentioned as well. So let's go to the code and train to the X to be 200 for example. So you will find that the point X right there, it will be changing to be 200 the height is still 100. As it is, let's go right now to create a bowl or to create an awful so, well, right bowl equals candles, dark, create novel. So, of course, as we are creating circle right here, so you will find that the X and the Y all this circle will be equal for sure. So we will go ahead and we will give it the within the high to be 10. And we will go to the bottom right corner to put it by 30 and 30 to be a little bit big and the color to fill its gonna be read. Okay, so let's trade the coat so you will find that the circle has been created and you will find that it left 10 from the West. The intent from the height and from the other point you will find that it left 30 from the height and 30 from the weather as well. So let's change the size of the circle. So if we go to the code and we change this 30 right here to be 60 you will find that the size will be increased and that other 30 for the X We will change it to be a 60 as well. So, as you see when we run the code, you will find that the size of the circle has been changed and has been increased. So you will find that the dimensions off the right problem point has been changed to be 60 by the X and 60 by the way. So now we know how to change the size of the rectangle and the size off the oval. So it's recap. So we spoke about two points the top left corner, and we spoke about the bottom right corner. He was in which we can determine the width of the rectangle or of the oval. And we used background with the canvas to change the background. Carter off the canvas and the tools that I will use on the converse like the rectangle and a circle. We use Phil to change its color. So I hope guys that you like this. Listen and see you in the next videos 35. OutPut in tkinter: Hello, guys. This mama drove from today will speak about a new listen in which we will use our tools professionally to create something different. So at first we will create a frame and then we will add a pardon, an output which is new and we will add an entry. And then we will connect between the output and the entry to take their values using the bottom. Maybe we spoke about something similar before, but it's not the same because it will be different a little bit. And we will speak about this practically so at first. As you see, we imported the library and then we created our class. And then we created our function to make a little poor the window and recreated the window right there. So let's continue our class. So we will go ahead and we will add death and it self. And then we were right. Self doubt frame equals t k dot fray. Then we will give it VD by one, and we will know why later. And then we will give it a relief equals take a sunken meticais. Here is my window for sure. Then let's add egret So we were right Self duck frame dot grid and we will give it a road by two. And the columns gonna be too as well. So now we need to give it bad X and bad. Why? To leave spaces from each dimension. So I will go ahead. I will add Solved a frame dot pack and we will give it pad exp i five and pared y by five as well. So now let's go ahead and try to give it a shot so we will run the code. And as you see, we have nothing on the window at Oh, so we must add the tools on the frame so we would get him on the window. So I will go ahead and they will add itself up. Button equals tick aids are button. So now I want to add this part on the frame. So I wasn't going to do that using the master. So I will write Master equals self frame, and I will give it a text. It's gonna be, for example, press. Then I need to add this but into the window. So I will write. Write their self doubt pardon dot pack so As you say. Once you run the code, you will find that the button appeared in front of us right here in the second column in the second row as I determined in the code. So now let's add the entry so I will write, write their self entry equals TK the entry and I will give it the master for sure it will Selves up freight. Then I will add it to the window. So I will write itself the entry pack. Then that's right, the code. And once you run the card, you will find that the party was right there and you will find down there this is the entry . And as you not assume, if I am that the paddocks and the pad wire are now existent on the window because the frame took place on the window right now and it's appear so The BD is by one as a determined and it's right here right now. And I said that the prey must take the song can We spoke about many shapes before preacher and that we determine the sunken right now. Then I want to create an output so I will go right there and I will add self. The output equals TK that text and we want to Adam to the frame for sure. So we were right, Messer. Equal Selves up, Frank. Then let's add it to the windows. So we were right self. The output, the attack. So let's take the code right now. So to make the shape or the general shape looks better, we need to make a paddocks and a pad wife for the entry. So we will take the paddocks and the pad y of the frame, and we will add him to the entry right here. So let's save and run the code. And here we go. You will find that in left space right there. So now what if I want to want to add a PD, so I will go ahead and they will believe this PD from the code. So it's gonna be better. That's from the code, and you will find that right here the beauty has been removed. The products and the pet Why are there the button and the entry and the out, but are exactly at their places? So now we can ride any value inside the entry and I can write any value inside the output. So what if I want to pass the value of the entry to be inside the output so I will create a function? So let's go to the code and they will add deaf. And let's call it action we will give itself. And then inside the function, we were right self. The output that insert. And that means we are focusing on the value which is inside the output. So focus at this point. So we will go ahead and we will write take a dead end. That means take the whole value. And then we will give itself that entry. And that means we need the value of the entry. And as we know, we can get the value of anything by using get so we will write, sell the entry dot gets So we want to add this to the button. So we will go to the bone and we were right to come and equal self dot action. So it's around the code and check it out. Okay. So, as you see this my winter right here. If I enter any value inside the entry and then I Quick on press, which is my bun bam! You will find that we have the same value inside the output right here. And we can make the complete opposite for sure. So now we know how to create an output. We know how to add the bun and the entry on our frame, how to use the paddocks and the pad wide to fix or to ah, adjust the whole shape of the window. So the whole session today was like a revision and as well we learned something new. I hope, guys, that you like the video and see in the next videos. 36. Frame Destroy: that'll get this Mahmoud drove today will speak deeper, empower the function, destroy we use it before in the previous listens to be as a replacement for quit. But today we will do use it in different way. So we will create a frame. And then we will create a label at a partner on this frame. And we will use the button to destroy the frame completely. So at first we import our library and wait made our loot. So now we need to import our tools. So we will import button the frame and the label. Then we create our class. So we will write class GeoEye. And then we will get our function, which is gonna be deaf in it. And we will add itself and roots right here. Then we will add itself. That route equals route. Now everything sit. So let's add the tools on the window right here. So we will add Selves up on equals fun and we will give itself route. And then we will give it a text and we will call it, push me for example. And then we will add it to the window. So we were right itself that pattern that pack. So once you run the code, you will find that the button will be appearing on the window right here. So now we need to greet Afraid so. We were right self. That frame equals frame and we will give it our windows yourself that route and then we need to add it to the windows. Will right itself dot frame dot pack. So now we need to create a label so well, right? Self dark label equals label. But now I will add it to the frame, not to the window. So we all right self dot freight and then we will give it a text. So we will call it, for example. I'll destroy now and that's given the Paxman right self labeled a pack. Let's run the code to check it out. So once you run the code, he will find that my button is right there in the middle of the window and down there you will find the label which is cold. I'll be destroyed now. So now we need to get the function or we need to make this part worked as we wanted to destroy the frame. So we will create a function for sure. So we will go ahead and we were right, Jeff and we'll school removed and we will give itself. There's our function right here. So we were right inside of itself. Frame that destroy. So now we need to connect their to the bottom. So we will go to the bottom rewrite. Comment equals Selves that removed. So once we go ahead and we run the code, you will find that everything is set. But once you run the code and then you click the button, you will find that the frame will be destroyed completely. So now if you have something in your program some tool in your program that you used and you want to remove it after you used it so you can use that code that we created right here . I hope guys, that you like the video and seeing the things videos 37. How to create Animation Ball: Hello guys. There's Mama drove until they will speak about the animation and how to use it with the gun verse. So at the begin and we will create canvas, all right in canvas equals canvas. Then I will put our window, which is TK and then we will write countless the pack than to use the whole size of the window. We need to use Phil and expend So we were right. Phil equals both and we will write, expand equals one. Then we will create our bull right here. So we were right. Bo equals canvas. Don't create avo, so let's give it its size. So we will say that it starts from 20 to 50. There's the width and the height and then we will give it a color which is gonna be Phil equals blue. So you will find that a bowl will be created on our window, which is blue. So you will find that it started from 20 and 20 as a point from right there and reaching the bottom right there by 50 and 50. And I made the converse on the whole window by making the failed by both and expand by one . So let's create our function that it's responsible for the animation. So we will write death animation. So I have X move and they have y move X move to move by the width and why moved to move by the height. And I were right canvas dot Move. So what? I want to move. I want to move the bowl so I will write the pole. I will pass it right there and then I will pass X move and why move? It's why I want this updates to happen once I run the coat So I will write this line right here, which is canvas dot update, which allows me to have all of the updates happened and once they run the code. So now I wanted to be moved, so I will write canvas dot after and it's being measured by Milli second. So I all right if the frames per second, which is the normal one. So if I go less than 50 you will find that the speed is increasing and if I go more than 50 you will find that the speed is decreasing. So it's keeping 50 until we see later how to increase and decrease the speed. Then I will write Take a dot after Aiso. And now what do we want to move in our window? So we want to move the animation so we will pass the animation and then we will pass X move on Why move right here and about the direction that the poll will move words which we were right right there animation and we will give it for and for and we will know why later. So once we run the code, you will find that the bull is moving towards four and four right here and its speed is 50 . So let's try to change the speed if we go right there and we write 20 so you will find that the speed has been increased to be 20. So if we go right there to change this four right here to be eight, you will find that the direction will be different. The ones who run the card, you will find that the direction that the bull is heading to is different. So if we go again and we make it 10 you will find that the direction is keeping in change So now we know how to create the animation on my canvas. So at the beginning we created our canvas and then we gave it Phil and expand, so we will be able to use it on the whole winter. Then we created our bowl using the create Oval. As we said before then, we created our function and we used the x move. And why move to be able to move the bold freely throughout the winter? Then we created the move and we put inside it the poll and the coordinations off the movement, which is the X move, and why move? And we created the update and we gave it the after which is responsible for this Pete. Then we put the animation and the X move in the wind, move on the window to be able to move the ball on the window. And we changed the direction by the animation. And then we have the idol right here, which is responsible to be as a loop for my variable, which is the canvas and the animation. I hope guys, that you like the session and see you in the names video 38. Project: I don't get this. Mama drove until they will speak about this scale we used before, and we know that. But we will use it today in advance it way and we will connected to a function. And then we will add some tricks. So let's check that out. So I will go right there at the beginning to create the scale. So we were right. Scale equals scale, and then we will give it our window, which is control. Then we will control our orientations that we need. So we will write Orient equals and we will make it horizontal. Then it's changed the length of our scale. So you're right. Length equals 300. Then it's changed the wits. So we will write the width equals 20 and then we will check it out later to know what is the wits and why do we use it. Then we will add from zero and two equals 1000 and that means there's the range of the scale. So then we cannot make the scale appear on the window unless we add the packs well, right? Scale packed. So let's run the code and we will check it out So here we go. There's my scale, the orientation of his personal. The length is 300 the width is 20 as you see. So if we go ahead and we change the wits to be 50 you will find that the width has been increased as you see in the winter. So now we want to add some values that will be gradual from Syria to 1000. So let's go first. To would change this wits to be 20 so it's gonna be more suitable. And then we will go ahead and we will add Take interval equals 100. So let's check this out. So once you run the card, you will find that started by zero, ended by 1000 and you will find that every time it's been increased by 100 because they sick interval had the value of 100. So if we change it to be 150 for example, you will find that every time the values being increased by 150. So now what if we want to change the limp off these lighter? So So let's go ahead and write. Slider win equals 20 So you will find there this lighter length is gonna be changed to 2020 is the default. So let's change it to be, for example, 50. So once you're on the card, you will find that the length of the Strider has been changed and you will find that every time I move it, it will be like that. So now we know how to change the properties off the slider. And we knew how to add the values on the cider and how to change the take interval, Which is gonna be how much or what is the value that will be increased by time on the slider and we know how to change the width, have changed the height and we know the orientation, which is gonna be personal here. Or we can make it vertical as well. And we know how to control our slider and how to give it a value from 0 to 1000. So that was the first case. So what about the second case? We will go ahead and we will remove all of that right here, as you see. So now we have that the organs is resemble and we'll have from 0 to 1000 so we will change the to value to be 100. So now it's normal scale from 0 to 100. It's normal. So now we want to create a function that once we increase the value of the slider, it will print something right there. So we will go right there and we will write deaf prints scale and we will give it a value, which is well, and we will write print scale value and this is what's gonna be print. And then we will go right there on the scale. And we were right. Comment equals print scale. So no nets tricked out. Once you write the code and you try to change that Snyder's value by starting it, you will find that the word or the sentence k values being printed right there. So now we know how to change the sliders values and based on them. And every time we change the value of the cider, you will find that s sentence or a word will they printed right there. So I hope guys that you like the video and you understood everything, and our listeners are endless. So We will be together all the time. Guys with help. Thank you so much. And if you need any help, you can call for it and we're gonna be there for you. Thank you so much and see you in the next videos. 39. How to create a Calculate: Hello, guys. This mom, Woodrow. From today we will make a simple program using which we will convert from one number to another. So today simply we will convert from mirror to centimeter. So that's check the code and the code. We will get first our tools. We will connected to our functions as any other program that we made before. So at the beginning we will create a frame in which we will put our tools and we will be able to organize all of them by using the pad X and bad wine. So we will create our frame. Then we will create the entry. And then we will connected to the string bar. He was into text variable, which is the method that I created. Then I will create a label. And then I will create another label to get the converted, that number on it. So we will put the converted value on it and we will call it Centimeter. Then I will can make my partner to the function in the function we have right there, the value equals float. Then we will get the value that is inside the entry by using get then I will write centimeter that set 100 by value, which is inside the entry, which means get the value from the entry and then multiplied by 100 then get it on my label right there, which is called Centimeter. Then I will get except the value error, which means if I write something else but a number, I will get an error. So let's try this. Practically so before we started in the last listens, we learned how to use our tools, the bottom label, the entry, the strange bar and him. We can connect between all of them and how to connect all of them to the function. So we don't need to re explain all of this, not to make the very too long. So first I will create our frame. And then we will create the entry right here, and I will connect it to the stream far by the text variable. And then I will put it in the second row. The first column, Then I will create those three labels right there. So let's check these shape our program you will find right here that we have our label in the first row in the second column, as I determined before, and the with is seven, as I can determine the width as I can. Then I put that label right here in the third column in the first row, which is called Mitter than I wrote down their equivalent to, and I put a space that will put a label in it that we will see later on. Then I wrote Santee matter. So let's see the label that we spoke about before. You will find that the labels right here it's connected to the string bar and I created apartment. So let's check that on our window. You will find that we have our button right here. It's in the third column of third draw, and I put my leaper right there in the second column in the second row at this space right here. So when I put anything inside the entry to be converted as the final value will be appearing right here in this space, So now I will use the windfall Children that's run the code, and you will find that there are spaces between my tools right now. So now we need to create the function that I will put it to convert the number that I will write in the interest. So the begin and we will create our function and we will call it death Calculate. Then we will write, try value equals float. Then we will give the value that is inside the entry which is the Mitter. So we will rights matter dot get So now this value will take the value of the matter So now we want to convert it. So we will get sent emitter dot set and we will writes 100 multiplied by the value that I will get So the value that is inside the entry will be multiplied by 100 will give me the final value that it's converted and then I will add except value error. Why, though, because if I put a number that is completely Iran put a value that is wrong inside the entry, I need an error message to appear for May. So as an air message, we were right groups. That was no valid number. So now we need to connect our function to our pattern so we wouldn't wake like on our bottom. We will convert automatically so inside of our bottom we will write. Comment equals calculate. So let's run our program. If we write any value inside the entry like one, for example, it's one matter right here. If we quit, calculate you will find that it will be converted into centimeter, which is 100. So if I put to you will find that it's 200. If I put 20 you will find at its 2000 and so on. So if I write any wrong value in the entry like a letter, for example and I quick on calculate you will find that an error message will appear for me , which is Oops, that was no valid number. But if I go right there again and they were right 10 you will find that it will be converted into 1000 which is valid converted number right there. So now we know how our function is working. It takes the value from the entry and we motive light by 100 then it will be executed as a final value in the label that I put it in my window and I said, right there that my label equals the strain bar, which is the sentiment. Er I hope, guys, that you understood everything and see you in the next video.