lets you register callback to be run immediately on button-press eventsmuch like normal button widgets but by associating tkinter variable with the variable optionyou can also fetch or change widget state at any time by fetching or changing the value of the widget' associated variable since it' bit simplerlet' start with the tkinter checkbutton example - creates the set of five captured in figure - to make this more usefulit also adds button that dumps the current state of all checkbuttons and attaches an instance of the verifying quitter button we built earlier in the tour figure - democheck in action example - pp \gui\tour\democheck py "create bar of check buttons that run dialog demosfrom tkinter import from dialogtable import demos from quitter import quitter get base widget set get canned dialogs attach quitter object to "meclass demo(frame)def __init__(selfparent=none**options)frame __init__(selfparent**optionsself pack(self tools(label(selftext="check demos"pack(self vars [for key in demosvar intvar(checkbutton(selftext=keyvariable=varcommand=demos[key]pack(side=leftself vars append(vardef report(self)for var in self varsprint(var get()end='print(def tools(self)frm frame(selffrm pack(side=right tkinter tourpart current toggle settings or