Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.51 InsertListItem Method

Description:

Inserts a ListItem object at the specified index position.

Used in controls:

ListView

Used in objects:

None.

Parameters:

1. VT_BSTR - TextStringX(8192)
2.[VT_I4 - IconIndexS9(9) COMP-5]
3.[VT_I4 - SmallIconIndexS9(9) COMP-5]
4.[VT_I4 - InsertIndexS9(9) COMP-5]

Description of Parameters:

TextString: The character string to be displayed in the ListItem object.
It corresponds to the value of Text(ListItem) property.

IconIndex: The index of the large icon for the ListItem object.
It is only effective when the Icons property is specified.

SmallIconIndex: The index of the small icon for the ListItem object.
It is only effective when the SmallIcons property is specified.

InsertIndex: The index position at which the ListItem object is inserted.
The value is an integer greater than zero.
If omitted, the ListItem is added to the end of the list.
Note: The ListItem is not inserted into the position specified by InsertIndex if the LVStyle property is "0 - LargeIcon" or "1 - SmallIcon". The ListItem is added at the last position.

Return value:

VT_I4 - ReturnValueS9(9) COMP-5

If positive, this is the index of the inserted item.

Example:

INVOKE CmCombo1 "InsertString"
  USING     TextString
            IconIndex
            SmallIconIndex
            InsertIndex
  RETURNING ReturnValue

Backward compatibility
method name:

None.