List Box Control Types

The parameter types TYPE_INTLISTBOX and TYPE_FLOATLISTBOX specifies a series of controls for displaying and managing a list box control containing a Tab<int> or Tab<float> parameter respectively. The setup consists of a list box control, 3 buttons (for adding, replacing and deleting items) and a 3ds Max spinner to supply source values for add and replace. After the control type, you must supply 4 dialog item IDs. The first is the list box control, then dialog item IDs for 3 custom button controls for the add, replace, and delete button respectively. These are followed with a spinner type, an edit box dialog item ID a spinner dialog item ID, and a display scale You can supply the value 0 for any of the add, replace, or delete buttons if you don't need them in the dialog. This can only be used with the following parameter types:

For TYPE_INTLISTBOX:

For TYPE_FLOATLISTBOX:

The add, replace, delete buttons automatically keep the Tab<> parameter synchronized with the list.

The TYPE_INT parameter type and TYPE_INTLISTBOX control type combination is treated as a special case and is used to allow a drop-down list to be associated with an int parameter such that the selection index in the drop-down becomes the integer parameter value. In this mode, after the control type you supply the list box control ID, then a count followed by that number of string resource IDs. These strings are used to populate the drop-down. The number of items can be zero, and the strings can be loaded manually in the dialog procedure.

For example:

... p_ui, TYPE_INTLISTBOX, <listcontrol id>, <number ofitems>, [ <item1 string id>, <item2 string id>, ... ] ...

See the std2_shader_type parameter in \MAXSDK\SAMPLES\MATERIALS\STDMTL2.CPP for an example.