How can I add options to a drop-down menu?
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
How can I add options to a drop down menu?
Property is defined as:
<property name="MyProp" caption="MyValues" control="select"> <attributes options="Value 1,Value 2"/> <callbacks> <onvalidate>OnValidateSelection</onvalidate> </callbacks> </property>
Tagged:
2
Best Answer
-
A new option “value” can be added thanks to:
load.Properties["MyProp"].Options.Add(str(value))
The list of options can be cleared with:
load.Properties["MyProp"].Options.Clear()
4
Answers
-
Have a look at the Mechanical Template 7 by clicking on the ACT Templates tab here:
https://catalog.ansys.com/Developers.cshtml0