Adding the new callbacks

Looking over our view code, the following callback functions need to be added to our callbacks dictionary:

  • show_recordlist(): This function is called when the user clicks the Record List option in the menu, it should cause the record list to be visible
  • new_record(): This function is called when the user clicks New Record in the menu, it should show a reset DataRecordForm
  • on_open_record(): This function is called when a record list item is opened, it should show DataRecordForm which is populated with the ID and data of the record
  • on_save(): This function is called when the Save button (now part of DataRecordForm) is clicked, it should cause the data in the record form to be updated or inserted in the model

We'll ...

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.