On the console, it will print the list of all the widgets defined in frame widget. #Print the List of all Child widget InformationĮxecuting the above code will display a window with a label and three buttons, Label(frame, text= "Top Level Text", font= ('Helvetica 20 bold')).pack(pady=20)īutton(frame, text= "Left").pack(side=LEFT)īutton(frame, text= "Right").pack(side= RIGHT)īutton(frame, text= "Center").pack(side= BOTTOM) In this example, we have defined some widgets in a frame and by using the winfo_children() method, we will print the list containing the names of all the widgets. In order to get the list of all the child widgets, we can use the winfo_children() method.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |