Mention how to remove TreeItem from a Tree
(cherry picked from commit f6aec99d27
)
This commit is contained in:
parent
cc08101d50
commit
6bb87d7d23
2 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
var subchild1 = tree.create_item(child1)
|
var subchild1 = tree.create_item(child1)
|
||||||
subchild1.set_text(0, "Subchild1")
|
subchild1.set_text(0, "Subchild1")
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root].
|
To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
|
Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons.
|
||||||
|
You can remove a [TreeItem] by using [method Object.free].
|
||||||
</description>
|
</description>
|
||||||
<tutorials>
|
<tutorials>
|
||||||
</tutorials>
|
</tutorials>
|
||||||
|
@ -350,7 +351,7 @@
|
||||||
<argument index="0" name="child" type="Object">
|
<argument index="0" name="child" type="Object">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Removes the given child TreeItem.
|
Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="select">
|
<method name="select">
|
||||||
|
|
Loading…
Reference in a new issue