summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-29 09:07:24 +0200
committerGitHub <noreply@github.com>2020-04-29 09:07:24 +0200
commita17bdb10a938e21901fb65984f38debb01f03f7b (patch)
tree48c010cde8691bb1ad53dd0f0ce143c6fba58326 /doc
parent4b5d4bbe483e50659320817925da6b564a075faf (diff)
parentf6aec99d27d2329740b40d7d0f6e06dad564f6e7 (diff)
Merge pull request #38074 from KoBeWi/tfree
Mention how to remove TreeItem from a Tree
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/TreeItem.xml3
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index b01ba3850f..0b2fb80480 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -16,7 +16,7 @@
var subchild1 = tree.create_item(child1)
subchild1.set_text(0, "Subchild1")
[/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>
<tutorials>
</tutorials>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 84aa3a3686..a8a17370c2 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
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>
<tutorials>
</tutorials>
@@ -350,7 +351,7 @@
<argument index="0" name="child" type="Object">
</argument>
<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>
</method>
<method name="select">