List Box

 
 
 

List boxes display a read-only text box that presents several items or values along with an optional animation divot and an optional label. They are associated to an underlying parameter of any numeric type.

You create them using the PPGLayout.AddItem or PPGLayout::AddItem method with the siControlListBox control type enum and then populate the list with the PPGItem.UIItems or PPGItem::GetUIItems or PPGItem::PutUIItems property:

var oListBox = oLayout.AddItem( "MyList", "", siControlListBox );
oListBox.SetAttribute( siUICY, 100 );

// 1D array of key,value pairs (since this is a string, just repeat them)
var aListItems = new Array( 
	"light", "light", 
	"sphere", "sphere", 
	"Camera", "Camera", 
	"Camera_Root", "Camera_Root", 
	"Camera_Interest", "Camera_Interest" 
);
oListBox.UIItems = aListItems;

NoteIf you set the default parameter to a value that is not in the array of allowed values, the selection in the list box is cleared.

The following item attributes are available:

Available on all Controls also as a property on the PPGItem object:

Common to many Controls:

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License