text: #!/usr/bin/env python3
  
  """
  ZetCode Tkinter tutorial
  
  This program toggles the title of the
  window with the Checkbutton widget.
  
  Author: Jan Bodnar
  Last modified: April 2019
  Website: www.zetcode.com
  """
  
  from tkinter import Tk, Frame, Checkbutton
  from tkinter import BooleanVar, BOTH
  
  class Example(Frame):
  
      def __init__(self):
          super().__init__()
  
          self.initUI()
  
  
      def initUI(self):
  
          self.master.title("Checkbutton")
  
          self.pack(fill=BOTH, expand=True)
          self.var = BooleanVar()
  
          cb = Checkbutton(self, text="Show title",
              variable=self.var, command=self.onClick)
          cb.select()
          cb.place(x=50, y=50)
  
  
      def onClick(self):
  
          if self.var.get() == True:
              self.master.title("Checkbutton")
          else:
              self.master.title("")
  
  
  def main():
  
      root = Tk()
      root.geometry("250x150+300+300")
      app = Example()
      root.mainloop()
  
  
  if __name__ == '__main__':
      main()
  