<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css">
<title>
Gambas Documentation - TreeView.Add
 (gb.qt)</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../../help+en"><img class="flag" alt="Home" border="0" src="../../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../treeview+en">Up</a>&nbsp;
<a href="_select+en">Previous</a>&nbsp;
<a href="available+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
TreeView.Add
 (gb.qt)</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><font color="blue">FUNCTION</font> <b>Add</b> <font color="blue">(</font> <u>Key</u> <font color="blue">AS</font> <font color="#0080FF">String</font><font color="blue">,</font> <u>Text</u> <font color="blue">AS</font> <font color="#0080FF">String</font> <b>[</b> <font color="blue">,</font> <u>Picture</u> <font color="blue">AS</font> <font color="#0080FF"><a href="../picture+en">Picture</a></font><font color="blue">,</font> <u>Parent</u> <font color="blue">AS</font> <font color="#0080FF">String</font><font color="blue">,</font> <u>After</u> <font color="blue">AS</font> <font color="#0080FF">String</font> <b>]</b> <font color="blue">)</font> <font color="blue">AS</font> <font color="#0080FF"><a href="../_treeviewitem+en">.TreeViewItem</a></font></pre>
Adds an item to the view.
<p>
<ul>
<li><u>Key</u> is the key of the new item.
<li><u>Text</u> is the text of the new item.
<li><u>Picture</u> is the picture displayed besides the item. By default, no picture is displayed.
<li><u>Parent</u> is the key of the parent item where the item will be inserted. By default, the new item is a root item.
<li><u>After</u> is the key of an item that the new item will directly follows. This item and the new item must have the same parent. By default, the new item become the last child of its parent.
<p>
</ul>

The newly created item is returned.

</div>
</body>
</html>

