Updating our form

Now that our widgets are all made, it's time to make the form use them by performing the following steps:

  1. Scroll down to the DataRecordForm class constructor, and we'll start updating our widgets one row at a time. Line 1 is fairly straightforward:
        self.inputs['Date'] = LabelInput(            recordinfo, "Date",            input_class=DateEntry,            input_var=tk.StringVar())        self.inputs['Date'].grid(row=0, column=0)        self.inputs['Time'] = LabelInput(            recordinfo, "Time",            input_class=ValidatedCombobox,            input_var=tk.StringVar(),            input_args={"values": ["8:00", "12:00", "16:00", "20:00"]})        self.inputs['Time'].grid(row=0, column=1)        self.inputs['Technician'] = LabelInput(            recordinfo, "Technician",            input_class=RequiredEntry,            input_var=tk.StringVar())

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.