<<

Contents

Search

>>

 

TREEVIEW_DELETE

 

 

Function

 

 

Syntax:

TREEVIEW_DELETE(<Item>[,<Handle>])

 

<Item>

= <STRING-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

Meaning:

Removes an item from a TREEVIEW.

 

 

<Element> can contain the text or the full path of the element after which the item is to be inserted. If <Element> only contains the text and if this text appears several times in the tree, the first element found is deleted. If <Element> is the empty string, the whole tree is deleted. 

 

Note: TREEVIEW_DELETE does not only delete one single element but also the subtree belonging to the <Element>!

 

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

 

Parameter:

Item

Full path or text of a treeview item

Handle

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

 

Sample:

ON SELECT(DEL) MACRO TREEVIEW.DELETE

H% = TREEVIEW(...)

...

 

Macro TREEVIEW.DELETE:

/* Delete the current item

H% = TREEVIEW_DELETE(EBUS_TREEVIEW$)

IF H% <> 0

THEN ... Error ...

ENDIF

 

See also:

TREEVIEW

TREEVIEW_DELETE_ITEM

TREEVIEW_INSERT

TREEVIEW_INSERT_ITEM

EBUS_TREEVIEW

EBUS_TREEVIEW$