DisplayBox.addListItem

Availability

Flash Player 7.

Usage

DisplayBox.addListItem([IDX,isSelectable,RollText,InsertBeforeID,RowColor])

Parameters

IDXOptional;The IDX which should be associated with this row, this would be of use to you for keeping track of the row, could contain the Unique Key from a database for example.

isSelectableOptional; If set to false, disables this row from being clicked on, images on the row can still be clickable based upon each individual image and how is was setup. default : true.

RollTextOptional; Sets the text the user sees in the rollover box when the mouse is over the row. default : No rollover

InsertBeforeID Optional; If you supply a numeric value, this will allow you to insert this new row before the row you specified, a value of 0 appeneds the row. default : 0.

RowColor Optional; Allows you to specify a different background color per row, a value of -1 will use the background color you specified for the control, a value of -1 will make this transparent. default : -1.

Returns

ID of the newly created row.

Description

Function; Creates a new row in the DisplayBox.

Example

In this example, we add a new row and image. When the user clicks on the image, the ImageClick Event is fired passing back which row and the name of the image that was clicked. We then modify the database or anything else that you are using the control for. Next we remove the clicked image, and set it to the next image. This example shows how to use the images as a pseudo checkbox in the control, therefore allowing multiple checkboxes, or multi-state symbols per row.

myDisplayBox.ImageClick=function(ID,ImageName) 
{
//Code to update your database or anything else that needs to be updated
myDisplayBox.removeItemImage(ID,ImageName);
if (ImageName==”UnChecked”)
{
myDisplayBox.addItemImage(ID,"Checked","imgCheckBoxSet",0,0,true,"Click here to change to user mode") ;
}
else
{
myDisplayBox.addItemImage(ID,"UnChecked","imgCheckBoxEmpty",0,0,true,"Click here to change to administrative mode") ;
} }
nID=myDisplayBox.addListItem();
myDisplayBox.addItemImage(nID,"UnChecked","imgCheckBoxEmpty",0,0,true,"Click here to change to administrative mode") ;

Author

Telsim, Inc.