Name
Listtree.Insert -- insert new tree node
Synopsis
mui.DoMethod(id, "Insert", entry$, id$, listnode$, prevnode$, flags$)
Function
Inserts entry$ at the position which is defined with listnode$ and prevnode$. Entry$ contains the name of the entry as string. id$ must be a unique string identifier that you want to use to refer to the newly inserted tree node.

In listnode$ you specify the node whose list is used to insert the entry. This can be the string identifier of a node or one of the following special values:

Root
The root list.

Active
The list of the active node.

In prevnode$ you have to specify the node which is the predecessor of the node to insert. This can be the string identifier of a node or one of the following special values:

Head
It will be inserted at the head of the list.

Tail
It will be inserted at the tail of the list.

Active
It will be inserted after the active node.

Sorted
The node is inserted using the sort hook.

Flags$ can be a combination of the following options:

List
The node contains a list where other nodes can be inserted.

Open
The list node is open, sub nodes are displayed.

Frozen
The node doesn't react on doubleclick or open/close by user.

NoSign
The indicator of list nodes isn't shown.

Active
The inserted entry will be set active, this means the cursor is moved on it.

NextNode
prevnode$ specifies the successor, not the predecessor, i.e. the node will be inserted before prevnode$, not after prevnode$.

If you specify multiple of the flags above, you have to separate them using a semicolon, e.g. "Active; NextNode".

Inputs
id
id of the listtree object
entry$
name of the entry to insert
id$
unique string identifier for new tree node
listnode$
id of list node to use or special value (see above)
prevnode$
id of tree node to use or special value (see above)
flags$
insertion flags (see above)

Show TOC