parameters: (self, ok_text='OK')
docstring: Create entry (rows, extras, buttons.
  
          Entry stuff on rows 0-2, spanning cols 0-2.
          Buttons on row 99, cols 1, 2.
docstring_summary: Create entry (rows, extras, buttons.
docstring_tokens: Create entry ( rows extras buttons .
function: def create_widgets(self, ok_text='OK'):  # Do not replace.
          """Create entry (rows, extras, buttons.
  
          Entry stuff on rows 0-2, spanning cols 0-2.
          Buttons on row 99, cols 1, 2.
          """
          # Bind to self the widgets needed for entry_ok or unittest.
          self.frame = frame = Frame(self, padding=10)
          frame.grid(column=0, row=0, sticky='news')
          frame.grid_columnconfigure(0, weight=1)
  
          entrylabel = Label(frame, anchor='w', justify='left',
                             text=self.message)
          self.entryvar = StringVar(self, self.text0)
          self.entry = Entry(frame, width=30, textvariable=self.entryvar)
          self.entry.focus_set()
          self.error_font = Font(name='TkCaptionFont',
                                 exists=True, root=self.parent)
          self.entry_error = Label(frame, text=' ', foreground='red',
                                   font=self.error_font)
          # Display or blank error by setting ['text'] =.
          entrylabel.grid(column=0, row=0, columnspan=3, padx=5, sticky=W)
          self.entry.grid(column=0, row=1, columnspan=3, padx=5, sticky=W+E,
                          pady=[10,0])
          self.entry_error.grid(column=0, row=2, columnspan=3, padx=5,
                                sticky=W+E)
  
          self.create_extra()
  
          self.button_ok = Button(
                  frame, text=ok_text, default='active', command=self.ok)
          self.button_cancel = Button(
                  frame, text='Cancel', command=self.cancel)
  
          self.button_ok.grid(column=1, row=99, padx=5)
          self.button_cancel.grid(column=2, row=99, padx=5)
function_tokens: def create_widgets ( self , ok_text = 'OK' ) : # Do not replace. # Bind to self the widgets needed for entry_ok or unittest. self . frame = frame = Frame ( self , padding = 10 ) frame . grid ( column = 0 , row = 0 , sticky = 'news' ) frame . grid_columnconfigure ( 0 , weight = 1 ) entrylabel = Label ( frame , anchor = 'w' , justify = 'left' , text = self . message ) self . entryvar = StringVar ( self , self . text0 ) self . entry = Entry ( frame , width = 30 , textvariable = self . entryvar ) self . entry . focus_set ( ) self . error_font = Font ( name = 'TkCaptionFont' , exists = True , root = self . parent ) self . entry_error = Label ( frame , text = ' ' , foreground = 'red' , font = self . error_font ) # Display or blank error by setting ['text'] =. entrylabel . grid ( column = 0 , row = 0 , columnspan = 3 , padx = 5 , sticky = W ) self . entry . grid ( column = 0 , row = 1 , columnspan = 3 , padx = 5 , sticky = W + E , pady = [ 10 , 0 ] ) self . entry_error . grid ( column = 0 , row = 2 , columnspan = 3 , padx = 5 , sticky = W + E ) self . create_extra ( ) self . button_ok = Button ( frame , text = ok_text , default = 'active' , command = self . ok ) self . button_cancel = Button ( frame , text = 'Cancel' , command = self . cancel ) self . button_ok . grid ( column = 1 , row = 99 , padx = 5 ) self . button_cancel . grid ( column = 2 , row = 99 , padx = 5 )