Accessing Component Properties
The properties of a component can be influenced through scripting. Each component property comes with a scripting reference. Once you have a reference to a component, you can treat it just like any Python object. You can call functions on it, and you can reference its properties, both standard and dynamic, with the "." accessor.
Example 1
To change the visibility of a component, access the component and set the property scripting name to either True or False to make the component visible or invisible.
event.source.parent.getComponent(
'Some Component'
).visible = False
Example 2
You could put this in a button next to the table, which would tell the user which row was selected, then clear the selection, and then print the table.
table = event.source.parent.getComponent(
"Table"
)
# Referencing properties of a component
row = table.selectedRow
system.gui.messageBox(
"The selected row is : %d"
% row)
# Setting properties of a component.
table.selectedRow = -
1
# Calling functions on components
table.print()