From the course: Rapid Application Development with Python

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Link edit fields to the tree

Link edit fields to the tree - Python Tutorial

From the course: Rapid Application Development with Python

Start my 1-month free trial

Link edit fields to the tree

- [Instructor] Now we have a tree to navigate. We need to populate the information in the lower part of the Audit pane. I've coded up the event handler stub for on_tree selection. So let's take a look at it. The first thing the event handler does at line 228 is to get the index of the selected requirement and use this to check whether the selected item is a leaf. If it's not, then there's no action required. If it is a leaf, we want to display the control Audit information. When we set up the tree, we put the spreadsheet row number for the requirement in as data in the leaf entry. And at line 230, the event handler picks this up to determine the cell numbers it needs. Column H is the evidence, column I the compliance rating, and column J, the assessment information. Starting at line 234, the event handler reads the information from the spreadsheet cells and displays it. For evidence and assessment, if there is no information,…

Contents