Bitmap resource dialog

The value dialog BitmapResourceDialog is used to create a button that allows to open the dialog for a bitmap resource selection.

../../../../_images/BitmapResource.png

Clicking the button opens the bitmap resource dialog like

../../../../_images/BitmapResourceDialog.png

After closing the dialog, the name and path of the selected bitmap is displayed as button text and assigned to the parameter.

Syntax

<Parameter>
<Name>BitmapName</Name>
<Text>Bitmap</Text>
<Value>0</Value>
<ValueType>String</ValueType>
<ValueDialog>BitmapResourceDialog</ValueDialog>
</Parameter>

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 button 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 BitmapResourceDialog value dialog is described in the example AllControls located in

..\etc\Examples\PythonParts\PaletteExamples\AllControls.pyp
..\etc\PythonPartsExampleScripts\PaletteExamples\AllControls.py