Enum Controls
 
 
 

There are five kinds of option/list groups available that are collectively referred to as Enum Controls and are can be added using the PPGLayout.AddEnumControl or PPGLayout::AddEnumControl method:

The value of the underlying parameter takes on the value of the selected item (except for the Bitfield control, which updates the parameter with the sum of selected items). The user cannot change the item values directly, but they can be changed dynamically through Logic.

The list of items that is displayed is controlled through the property page layout, not through its associated parameter on the underlying property set. This means that you have to set the array of values to be displayed by assigning them as an array of label-value pairs using the PPGItem.UIItems or PPGItem::GetUIItems or PPGItem::PutUIItems property.

Tip

You can update this list dynamically, but because these values are actually controlled by the layout of the property page (rather than a parameter in the underlying property set), you need to use the PPG.Refresh method to update the display.

Note

All instances of a custom property set share the layout, so if you specify that a list of items uses a combo box, that's the way the list will always appear until you change the layout definition for the custom property set.

Important

When retrieving the array of values on the PPGItem.UIItems or PPGItem::GetUIItems or PPGItem::PutUIItems property, bear in mind that a safearray is returned. For JScript, this means that you have to assign it to a VBArray object and then convert that to a native JScript array.

For more information on changing these values dynamically, see Changing the Layout.