part pack(side=leftexpand=yesfill=bothparts append(partdef dumpstate()for part in partsprint(part __module__ ':'end='if hasattr(part'report')part report(elseprint('none'or pass configs to demo(growstretch with window change list in-place run demo report if any root tk(make explicit root first root title('frames'label(roottext='multiple frame demo'bg='white'pack(button(roottext='states'command=dumpstatepack(fill=xquitter(rootpack(fill=xaddcomponents(rootroot mainloop(because all four demo launcher bars are coded as frames which attach themselves to parent container widgetsthis is easier than you might thinksimply pass the same parent widget (herethe root windowto all four demo constructor callsand repack and configure the demo objects as desired figure - shows this script' graphical result-- single window embedding instances of all four of the dialog demo launcher demos we saw earlier as codedall four embedded demos grow and stretch with the window when resized (try taking out the expand=yes to keep their sizes more constantfigure - demoall_frmnested subframes naturallythis example is artificialbut it illustrates the power of composition when applied to building larger gui displays if you pretend that each of the four attached tkinter tourpart