found, table = mui.DoMethod(id, "GetEntry", node, position, flags$)
"Node" specifies the node which is used to find another one. This
can also be a list node, if the position a related to a list. In contrast
to all other methods or attributes of Listtree class, "node" must NOT
be a string identifier but a special value returned by this method
or by Listtree.FindName in the
MuiID field of
the return table (see below). Alternatively, it can be one of the
following special values:
Position specifies the number of nodes of the list specified in "node" or one of the following special values:
Flags$ can be a combination of the following options:
If you specify multiple of the flags above, you have to separate them using a semicolon, e.g. "SameLevel; Visible".
This method returns two values: The first return value is a boolean
flag which indicates whether or not a node was found. If the first
return value is
True, the second return value is a table with the
following fields initialized:
Trueif the found entry is a node,
Falseif it is a leaf.
Function p_DumpListTree(id$, node, indent) Local found, t = mui.DoMethod(id$, "GetEntry", node, "Head", "") While found = True If indent > 0 DebugPrint(RepeatStr(" ", indent) .. IIf(t.Node = True, "+", "") .. t.name) Else DebugPrint(IIf(t.Node = True, "+", "") .. t.name) EndIf If t.Node = True Then p_DumpListTree(id$, t.muiid, indent + 4) found, t = mui.DoMethod(id$, "GetEntry", t.muiid, "Next", "") Wend EndFunction p_DumpListTree("mylisttree", "root", 0)The code above shows how to dump the complete contents of a listtree, preserving its structure.