[Paraview] String Drop Down XML

Brian Panneton brian.panneton at gmail.com
Wed Mar 9 16:24:08 EST 2011


I can't seem to figure out how to make a drop down list with strings from a
reader. I have created a drop down list with integers, and I have read that
it was possible, but I can't figure out what I need to implement. If any one
has any good examples (XML and C++) that would be great.

If I have this:
[code]
            <StringVectorProperty name="CellArrayInfo"
                information_only="1">
                <ArraySelectionInformationHelper attribute_name="Cell"/>
            </StringVectorProperty>
            <StringVectorProperty name="CellArrayStatus"
                command="SetCellArrayStatus"
                number_of_elements="0"
                repeat_command="1" number_of_elements_per_command="2"
                element_types="2 0"
                information_property="CellArrayInfo"
                label="Cell Arrays">
                <ArraySelectionDomain name="array_list">
                    <RequiredProperties>
                        <Property name="CellArrayInfo"
                            function="ArrayList"/>
                    </RequiredProperties>
                </ArraySelectionDomain>
            </StringVectorProperty>
[/code]

I read that I could change:
[code]
                number_of_elements="0"
                repeat_command="1" number_of_elements_per_command="2"
[/code]

to
[code]
                number_of_elements="1"
[/code]

but that does not work.

I also tried using the EnumerationDomain with IntVectorProperty. This will
only give me a dropdown with integers.

Note: I'm not looking for this:
[code]
<EnumerationDomain name="enum">
          <Entry text="Stuff" value="0" />
           ....
[/code]

If I am not able to do a dropdown with a string, is there a way to only
allow one item to be selected in my first sample of xml?

Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110309/0cca1d11/attachment.htm>


More information about the ParaView mailing list