class_docstr: An implementation of BaseGUITestRunner using Tkinter.
      
class_docstr_tok: ["An","implementation","of","BaseGUITestRunner","using","Tkinter","."]
docstr: Creates and packs the various widgets.
  
  Why is it that GUI code always ends up looking a mess, despite all the
  best intentions to keep it tidy? Answers on a postcard, please.
docstr_tok: ["Creates","and","packs","the","various","widgets",".","Why","is","it","that","GUI","code","always","ends","up","looking","a","mess",",","despite","all","the","best","intentions","to","keep","it","tidy","?","Answers","on","a","postcard",",","please","."]
code: def createWidgets(self):
      """Creates and packs the various widgets.
  
      Why is it that GUI code always ends up looking a mess, despite all the
      best intentions to keep it tidy? Answers on a postcard, please.
      """
      # Status bar
      statusFrame = tk.Frame(self.top, relief=tk.SUNKEN, borderwidth=2)
      statusFrame.pack(anchor=tk.SW, fill=tk.X, side=tk.BOTTOM)
      tk.Label(statusFrame, width=1, textvariable=self.statusVar).pack(
          side=tk.TOP, fill=tk.X
      )
  
      # Area to enter name of test to run
      leftFrame = tk.Frame(self.top, borderwidth=3)
      leftFrame.pack(fill=tk.BOTH, side=tk.LEFT, anchor=tk.NW, expand=1)
      suiteNameFrame = tk.Frame(leftFrame, borderwidth=3)
      suiteNameFrame.pack(fill=tk.X)
  
      # Progress bar
      progressFrame = tk.Frame(
          leftFrame, relief=tk.GROOVE, borderwidth=2
      )
      progressFrame.pack(fill=tk.X, expand=0, anchor=tk.NW)
      tk.Label(progressFrame, text="Progress:").pack(anchor=tk.W)
      self.progressBar = ProgressBar(
          progressFrame, relief=tk.SUNKEN, borderwidth=2
      )
      self.progressBar.pack(fill=tk.X, expand=1)
  
      # Area with buttons to start/stop tests and quit
      buttonFrame = tk.Frame(self.top, borderwidth=3)
      buttonFrame.pack(side=tk.LEFT, anchor=tk.NW, fill=tk.Y)
  
      tk.Button(
          buttonFrame,
          text="Discover Tests",
          command=self.discoverClicked,
      ).pack(fill=tk.X)
  
      self.stopGoButton = tk.Button(
          buttonFrame,
          text="Start",
          command=self.runClicked,
          state=tk.DISABLED,
      )
      self.stopGoButton.pack(fill=tk.X)
  
      tk.Button(buttonFrame, text="Close", command=self.top.quit).pack(
          side=tk.BOTTOM, fill=tk.X
      )
      tk.Button(
          buttonFrame, text="Settings", command=self.settingsClicked
      ).pack(side=tk.BOTTOM, fill=tk.X)
  
      # Area with labels reporting results
      for label, var in (
          ("Run:", self.runCountVar),
          ("Failures:", self.failCountVar),
          ("Errors:", self.errorCountVar),
          ("Skipped:", self.skipCountVar),
          ("Expected Failures:", self.expectFailCountVar),
          ("Remaining:", self.remainingCountVar),
      ):
          tk.Label(progressFrame, text=label).pack(side=tk.LEFT)
          tk.Label(
              progressFrame, textvariable=var, foreground="blue"
          ).pack(side=tk.LEFT, fill=tk.X, expand=1, anchor=tk.W)
  
      # List box showing errors and failures
      tk.Label(leftFrame, text="Failures and errors:").pack(anchor=tk.W)
      listFrame = tk.Frame(leftFrame, relief=tk.SUNKEN, borderwidth=2)
      listFrame.pack(fill=tk.BOTH, anchor=tk.NW, expand=1)
      self.errorListbox = tk.Listbox(
          listFrame,
          foreground="red",
          selectmode=tk.SINGLE,
          selectborderwidth=0,
      )
      self.errorListbox.pack(
          side=tk.LEFT, fill=tk.BOTH, expand=1, anchor=tk.NW
      )
      listScroll = tk.Scrollbar(
          listFrame, command=self.errorListbox.yview
      )
      listScroll.pack(side=tk.LEFT, fill=tk.Y, anchor=tk.N)
      self.errorListbox.bind(
          "<Double-1>", lambda e, self=self: self.showSelectedError()
      )
      self.errorListbox.configure(yscrollcommand=listScroll.set)
  
imports: import sys
  import traceback
  import unittest
  import tkinter
  from tkinter import messagebox
  from tkinter import filedialog
  from tkinter import simpledialog
label_desc: Use image node_id 5 for calling the TkTestRunner obj's underlying member method code with example usage: obj.createWidgets() without return types