RComboBox.UpdateItem


public function UpdateItem

Prototype:

public function UpdateItem(position, item)

Parameters

position
the position(index) where to add the item
item
the updated item

Description:

This function updates an item at the given position. The item can be a string/number or RImage (for combo boxes with one column) or an array for combos containing more than one column. Notice that when update an item, you must provide all the columns for multi-columns combos. In addition, you should avoid the use of this function for combo boxes that have the Sorted property set to true.

Return value:

This function returns -1 if the position is invalid, or the position otherwise.

Example
	// for combo with one column, update the fifth item
	Combo.UpdateItem(5, "column");

	// for combo with two columns, update the fifth item
	Combo.UpdateItem(5,["column one","column two"]);

	// also, if you added a column as IMAGE_COLUMN
	myImage=new RImage(null);
	myImage.Filename="picture.jpg";
	Combo.UpdateItem(5,myImage);