moai.DoMethod(id, "InsertLeaf", id$, node$, pred$, [icon1,] entry1$, ...)
node$
and pred$
. A leaf is a treeview item that doesn't have any
children. id$
must be a unique string identifier that you want to use to
refer to the newly inserted treeview leaf.
The entry data for the new leaf has to be passed in the last parameters.
If the treeview has multiple columns, you need to pass individual entry data
for all the columns in the treeview. The entry data consists of a text string
and, if the column has the Treeviewcolumn.Icon attribute set, an icon
for each column. The icon has to be passed before the text string and it has
to be an identifier of a Hollywood brush/icon which should be used as the icon for
the entry. If Treeviewcolumn.Icon isn't set, then you must
omit the icon parameter and only pass text data for the treeview
entry. If you've set Treeviewcolumn.Icon to True
and you
don't want to show an icon in this particular row and column, you
can also pass the special value -1. In that case, RapaGUI won't
show an icon even though Treeviewcolumn.Icon has been
set to True
. Please note that auto-generated IDs cannot be used.
Please also read about RapaGUI's image cache to learn more
about icon support in RapaGUI. See Image cache for details.
In case a column is showing a checkbox, you have to pass "On", "True", or "1" to select the checkbox and any other text to deselect the checkbox.
In node$
you have to pass the node whose list is used to insert the
new leaf. This can be the string identifier of a node or one of the
following special values:
Root
In pred$
you have to specify the node or leaf which will become the
predecessor of the leaf to insert, i.e. the new leaf will be inserted
after the item specified in pred$
. This can be the string identifier
of a node or a leaf or one of the following special values:
Head
Tail
Active
Note that on AmigaOS and compatibles icon support is only available with MUI 4.0 or better.