How to dynamically vary properties of a load object?
Ayush Kumar
Member, Moderator, Employee Posts: 442
✭✭✭✭
Answers
-
The XML can be defined only static with all the possible properties defined.
<onvalidate>
callback of a property can be used to hide/show other load object properties using Python.Eg:
<property name="SelectStatic" caption="Select (static)" control="select"> <attributes options="Option 1,Option 2,Option 3" /> <callbacks> <onvalidate>hide_other_properties</onvalidate> </callbacks> </property>
def hide_other_properties(load, property): if property.Value == "Option 1": load.Properties["SelectDynamic"].Visible = False else: load.Properties["SelectDynamic"].Visible = True ExtAPI.DataModel.Tree.Refresh()
0