<<

Contents

Search

>>

 

TREEVIEW_INSERT_ITEM

 

 

Function

 

 

Syntax:

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

 

<Insert After>

= <NUM-EXPRESSION>

<Item>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

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

 

<Insert After> is the number of the array element behind which the item is to be inserted.

 

<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.

 

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

 

Parameter:

Insert After

Number of array element

Item

Item which shall 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(...)

...

 

Makro TREEVIEW.INSERT:

IF EBUS_TREEVIEW < 2

THEN LEVEL$ = "1"

ELSE LEVEL$ = SUBSTR$(ARRAY$(EBUS_TREEVIEW–1),";",1)

ENDIF

INSERT$ = LEVEL$ + ";person.bmp;Bauer Marion"

H% = TREEVIEW_INSERT_ITEM(EBUS_TREEVIEW,INSERT$)

IF H% <> 0

THEN ... Error ...

ENDIF

 

See also:

TREEVIEW

TREEVIEW_INSERT

TREEVIEW_DELETE

TREEVIEW_DELETE_ITEM

EBUS_TREEVIEW

EBUS_TREEVIEW$