Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.50 Insert Method

Description:

Inserts the Node object at the specified index position.

TreeView

If the Sorted property is set to True, the Node object is sorted immediately after the insert.

Used in controls:

TreeView

Used in objects:

Node

Parameters:

VT_I4 - InsertIndex S9(9) COMP-5

VT_BSTR - TextStringX(8192)

[VT_I4 - ImageIndex S9(9) COMP-5]

[VT_I4 - SelectImageIndexS9(9) COMP-5]

[VT_I4 - ExpandImageIndexS9(9) COMP-5]

Description of Parameters:

InsertIndex: The index position at which the Node object is inserted.

TextString: The character string displayed in the Node object.

ImageIndex: The index of an image for the Node object.

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

ExpandImageIndex: The index of an image to use when the Node object is expanded.

Return value:

None.

Example:

WORKING-STORAGE SECTION.
01 Ipos           PIC S9(9) COMP-5.
01 iString        PIC X(20).
01 ImageIndex     PIC S9(9) COMP-5.
01 SelimageIndex  PIC S9(9) COMP-5.
01 ExpimageIndex  PIC S9(9) COMP-5.
01 ReturnValue    PIC S9(9) COMP-5.
PROCEDURE DIVISION.
    MOVE 1         TO iPos
    MOVE "My Item" TO iString
    MOVE 1         TO ImageIndex
                      SelimageIndex
                      ExpimageIndex
    INVOKE CmTreeView1 "Insert" 
      USING     iPos 
                iString 
                ImageIndex
                SelimageIndex
                ExpimageIndex
      RETURNING ReturnValue

Backward compatibility
method name:

None.