How can I add options to a drop-down menu?

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 867
500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
✭✭✭✭
edited June 2023 in Structures

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:

Best Answer

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 867
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭
    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()
    

Answers