Creates a drop list user control on the user window specified by
A drop list enables the user to select from a set of list of items, with the list dynamically displaying when the user clicks an arrow button.
The control is initially placed in the top-left corner of the user window, and must be placed by using the
-pos option, or by using the setControlPos command.
The height of the "edit" portion of the drop list is always fixed, regardless of the height specified using the -pos option or setControlPos command. The height of the list portion of the drop list is specified by the height of the control.
The command returns the Control ID of the user control, which should be saved for later operations on the control.
|string||no||One or more strings are allowed to populate the list portion of the drop list.|
|int||yes||ID of user window to place the control on.|
|Name||Flag arguments||Argument type||Exclusive to||Comments|
|0||—||—||Forces the control to automatically sort the items in the list. The default is unsorted.|
|0||—||—||Specifies that the control should be hidden initially. Call showControl to subsequently make it visible. The default is for it to be visible.|
|1||integer||—||A zero based index of the item to be selected. The default is no selection.|
|1||integer array||—||A four-element int array representing a rectangle, which specifies the initial size/position of the control relative to the top left corner of the user window. The element order is Left, Top, Right, and Bottom. The default is a drop list 100 units high by 100 units wide.|
|1||integer||—||Control ID of the form user control which will dynamically position this control.|
// Create a drop list user control.
// First create a user window to place the Control on
$windowId = `createWindow "MyWindow"`;
// Create the Control on the Window, passing
// in the Window Id of the user window we
// just created. Make the list sorted, add some items,
// and set the initial selection
$controlId = `createDropList $windowId "Item #3" "Item #1" "Item #2" -sort -sel 2`;