Using Frames inside Menu App in TKinter - Python Tutorial (2020) #29

preview_player
Показать описание
The TKinter Frames Video:-

Previous Video for Better Understanding:-

The Frame widget is very important for the process of grouping and organizing other widgets in a somehow friendly way. It works like a container, which is responsible for arranging the position of other widgets.

It uses rectangular areas in the screen to organize the layout and to provide padding of these widgets. A frame can also be used as a foundation class to implement complex widgets.

#python2020 #tkintergui #madaboutpython #tkintertutorial #tkinterprojects #tkinterinpython #tkinterguitutorial
Рекомендации по теме
Комментарии
Автор

very well done chap. is this your last mad about python series?

sarminsarmin
Автор

Great video series - simple and easy to follow. However in this one if you use the About menu drop down, the label is defined in a "local" function and cannot be cleared by adding l1.pack_forget to the hide_everything function. You have to create the label after the frames and then pack it in About command:

file_frame = Frame(root, width=500, height=500, bg='green')
edit_frame = Frame(root, width=500, height=500, bg='red')
option_frame = Frame(root, width=500, height=500, bg='yellow')
l1 = Label(root, fg="black", text="This is a free app by XYZ developer", font=('Arial', 20))

def hide_everything():
file_frame.pack_forget()
edit_frame.pack_forget()
option_frame.pack_forget()
l1.pack_forget()

def about():
# l1 = Label(root, fg="black", text="This is a free app by XYZ developer", font=('Arial', 20))
# move l1 definition outside this function so it is visible to pack_forget() action
# but pack it now when about function is called
hide_everything()
l1.pack()


Keep up the work.

richardsmith
Автор

Tum narvals mat hona tum mehnat karna

dlstechnologytech
welcome to shbcf.ru