<<

Contents

Search

>>

 

TREEVIEW_INSERT

 

 

Function

 

 

Syntax:

TREEVIEW_INSERT(<Insert After>,<Item>[,<Handle>])

 

<Insert After>

= <STRING-EXPRESSION>

<Item>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

Inserts an item into the TREEVIEW behind the item <Insert After>.

 

<Insert After> can contain the text or the full path of the element after which the item is to be inserted. If <Insert After> only contains the text and not the full path, the item is inserted behind the first found element of the tree if the text appears several times in the tree.

 

<Item> must have the same structure as with the call of TREEVIEW:

 

<Level><Separator><Image Name><Separator><Text>

 

The <Level> must be identical with the level of the element <Insert After> or by one 1 bigger than this level.

If  <Level> is  by one 1 bigger than the level from <Insert After> the element is inserted as subelement from <Insert After>.

 

TREEVIEW_INSERT returns the result 0 if no error occurred, otherwise an error number (read TREEVIEW).

 

Parameter:

Insert After

Full path or text of a treeview item

Item

Item to be inserted.

Handle

Window depth or handle of a split window or handle of a TREEVIEW.

 

Sample:

ON SELECT(INS) MACRO TREEVIEW.INSERT

H% = TREEVIEW(...)

...

 

Macro TREEVIEW.INSERT:

NEU$ = "2;person.bmp;Smith John"

INSERT$ = "Smith Barbara"

H% = TREEVIEW_INSERT(INSERT_AFTER$,INSERT$)

IF H% <> 0

THEN ... Error ...

ENDIF

 

See also:

TREEVIEW

TREEVIEW_INSERT_ITEM

TREEVIEW_DELETE

TREEVIEW_DELETE_ITEM

EBUS_TREEVIEW

EBUS_TREEVIEW$