changes its variablebut changing variable also changes all the widgets it is associated with in the world of slidersmoving the slide updates that variablewhich in turn might update other widgets associated with the same variable because this script links one variable with two scalesit keeps them automatically in syncmoving one scale moves the othertoobecause the shared variable is changed in the process and so updates the other scale as side effect linking scales like this may or may not be typical of your applications (and borders on deep magic)but it' powerful tool once you get your mind around it by linking multiple widgets on display with tkinter variablesyou can keep them automatically in syncwithout making manual adjustments in callback handlers on the other handthe synchronization could be implemented without shared variable at all by calling one scale' set method from move callback handler of the other 'll leave such manual mutation as suggested exercisethough one person' deep magic might be another' useful hack running gui code three ways now that we've built handful of similar demo launcher programslet' write few top-level scripts to combine them because the demos were coded as both reusable classes and scriptsthey can be deployed as attached frame componentsrun in their own top-level windowsand launched as standalone programs all three options illustrate code reuse in action attaching frames to illustrate hierarchical gui composition on grander scale than we've seen so farexample - arranges to show all four of the dialog launcher bar scripts of this in single container it reuses examples - - - and - example - pp \gui\tour\demoall-frm py "" demo class components (subframeson one windowthere are quitter buttons on this one window tooand each kills entire guiguis can be reused as frames in containerindependent windowsor processes""from tkinter import from quitter import quitter demomodules ['demodlg''democheck''demoradio''demoscale'parts [def addcomponents(root)for demo in demomodulesmodule __import__(demopart module demo(rootimport by name string attach an instance running gui code three ways