![]() ![]() This methods can call by using the Tkinter object so first create its object. This method is used to get the current height of the window. Width1 = parent.winfo_screenwidth() 2) winfo_screenheight() : Let’s see one simple example for beginner to use this while programming This method is used to get the current width of the window. This methods will help us to get the width and height of the window. If you want to see or fetch the current size of the window, then we can call the methods available in Tkinter. Methods are generally used to get the current value of the variable. Both these methods use below constructor after this we can use or call them. while creating the object we used no parameter constructor and call this methods. Here is no constructor because these are itself a method which is called on the Tkinter object. This is very important to call otherwise we will not be able to see the window. This method is also called on the Tkinter object. The first parameter is width and the second we are assigning is height here.Īt last, we are calling mainloop () method, this method is used to initialize the window in Tkinter. Here we are calling this method on the Tkinter object because it can be access by its object only. minsize (): This method is also used to size our window.Here we are assigning 100×100 as the size of the window. ![]() Indirectly it takes height and width in a different format we can say. It only takes one parameter and this will be a string value separated by ‘x’ operator.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |