Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.5 Add Method

Description:

Adds a ListItem object to a ListView control or a child Node object to the TreeView control and Node object.

Used in controls:

ListView

TreeView

Used in objects:

Node

Parameters:

ListView

VT_I4 - IconIndexS9(9) COMP-5

VT_I4 - SmallIconIndexS9(9) COMP-5

TreeView and
Node

VT_BSTR - TextStringX(8192)

VT_I4 - ImageIndexS9(9) COMP-5]

[VT_I4 - SelectImageIndexS9(9) COMP-5]

[VT_I4 - ExpandImageIndexS9(9) COMP-5]

Description of Parameters:

ListView

IconIndex: Contains the index of the image to use in the large icon display style. It is only used when the LVStyle property is "0 - Large icon".

SmallIconIndex: Contains the index of the image to use in the small icon display style. It is only used when the LVStyle property is "1 - Small icon".

TreeView and
Node

TextString: Contains the text displayed at the Node object.

ImageIndex: Contains the index of the image to use for the Node object.

SelectImageIndex: Contains the index of the image to use when the Node object is selected.

ExpandImageIndex: Contains the index of the image to use when the Node object is expanded

Return value:

VT_I4 - ReturnValueS9(9) COMP-5

The index of the added item (ListItem object or Node object).

Examples:

Listview:

INVOKE ListView-Name "Add"
  USING     Icon  
            SmallIcon
  RETURNING ReturnValue

TreeView control, Node object::

INVOKE Node-Name "Add"
  USING     Text  
            Image
            SelectedImage
            ExpandedImage
  RETURNING ReturnValue

Backward compatibility
method name:

None.