PictureButtonList

The value type PictureButtonList is used to create a button list for the input of an integer value. The value is entered by selecting a button from the list.

../../../../_images/PictureButtonList.png

Syntax

<Parameter>
<Name>PictureButtonListRow</Name>
<Text>PictureButtonList</Text>
<ValueType>Row</ValueType>

<Parameter>
<Name>PictureButtonListValue</Name>
<Text>Length=1|Length=2|Length=3</Text>
<Value>0</Value>
<ValueList>0|1|2|3</ValueList>
<ValueList2>param01.png|param02.png|param03.png</ValueList2>
<ValueType>PictureButtonList</ValueType>
</Parameter>
</Parameter>

The <Text> is used for the buttons tooltip. The text must be separated by the pipe | character, which must also be used for the text IDs in the <TextId> tag.

The <ValueList2> tag is used to define the image entries of the button list. The values are png file names with path specification and must be separated by the pipe | character.

The <ValueList> tag defines the corresponding integer value for the image that will be assigned to the parameter after selecting the button. The values must be separated by the pipe | character.

The <Value> tag defines the value of the button which will be selected by default.

Optional tags

If the PythonPart should be localized, the following tag must be added

<TextId>1001</TextId>

Sometimes it’s useful to disable or hide the picture button list depending on the value of another parameter. This is achieved by adding additional tags to the parameter or by defining functions in the py-file. See Enable and visible options

The persistent state of the parameter can be changed by adding

<Persistent></Persistent>

Example

The implementation of the PictureButtonList value type is described in the example ButtonList, which is located in

…\etc\Examples\PythonParts\PaletteExamples\ButtonList.pyp
…\etc\PythonPartsExampleScripts\PaletteExamples\ButtonList.py