From the course: Rapid Application Development with Python
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Link an edit field to a data source - Python Tutorial
From the course: Rapid Application Development with Python
Link an edit field to a data source
- The CSF audit spreadsheet contains the audit status information for a system in cell 2E, which we'll display on the main tab sheet. The field we need to populate is tc_sysinfo, and the trigger for displaying it will be a change in the list box selection. If I check the list box events, I can see we have a list box event and a double click event. The event list box event occurs when an item in the list is selected or the selection changes. We'll use this to trigger a re-display of tc_sysinfo. Let's put in an event handler, on_list_change, and we can now regenerate the source code and go and put in the event handler code. Okay, now we have an event handler stub at line 125. We need to set the information when we first start the application, and then every time we change the list. I'll make the code to get and display the information a function that we can call. Display_info, and it will come with a parameter of self.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Generate code for the app2m 30s
-
(Locked)
Add Excel sheetnames to a listbox3m 24s
-
(Locked)
Link an edit field to a data source3m 51s
-
(Locked)
Add event handlers in wxPython6m 48s
-
(Locked)
Complete the main tab sheet3m 17s
-
(Locked)
Build and using tree controls4m 28s
-
(Locked)
Link edit fields to the tree1m 44s
-
(Locked)
Save data into the worksheet1m 46s
-
(Locked)
Review Python RAD with wxGlade4m 32s
-
(Locked)
-