--- a/docs/trunk/publican/oodialog/en-US/treeview.xml
+++ b/docs/trunk/publican/oodialog/en-US/treeview.xml
@@ -120,8 +120,8 @@
 <entry align="center"><emphasis role="bold">Instance Methods</emphasis></entry>
 </row>
 <row>
-<entry>add</entry>
-<entry><xref linkend="addtrc"/></entry>
+<entry><xref linkend="mthAddClsTreeView"/></entry>
+<entry>Adds a new item to the tree-view.</entry>
 </row>
 <row>
 <entry>Child</entry>
@@ -184,6 +184,10 @@
 <entry>Gets the user data associated with the specified tree-view item.</entry>
 </row>
 <row>
+<entry><xref linkend="mthGetItemTextClsTreeView"/></entry>
+<entry>Gets the text, the label, of the specified tree-view item.</entry>
+</row>
+<row>
 <entry>HitTest</entry>
 <entry><xref linkend="hittest"/></entry>
 </row>
@@ -257,7 +261,7 @@
 </row>
 <row>
 <entry>Root</entry>
-<entry><xref linkend="root"/></entry>
+<entry><xref linkend="mthRoot"/></entry>
 </row>
 <row>
 <entry>select</entry>
@@ -278,6 +282,10 @@
 <row>
 <entry>SortChildren</entry>
 <entry><xref linkend="sortchildren"/></entry>
+</row>
+<row>
+<entry><xref linkend="mthSortChildrenCBClsTreeView"/></entry>
+<entry>Has the tree-view sort the children of the specified item by invoking a custom comparsion method in the Rexx dialog.</entry>
 </row>
 <row>
 <entry>subclassEdit</entry>
@@ -340,116 +348,174 @@
 </para>
 </section>  <!-- End connectTreeViewEvent() [EventNotification method] -->
 
-<section id="addtrc"><title>add</title>
-<indexterm><primary>add</primary>
-<secondary>TreeView class</secondary></indexterm>
-<programlisting>
-<![CDATA[
-          +-------+
-          V       |     +-""---+     +-0-----+
->>--add(----+---+-+--,--+------+--,--+-------+--,--->
-            +-,-+       +-text-+     +-image-+
-
-                                                   +-"0"-+
->--+----------+--,--+------------------------+--,--+-----+--)--><
-   +-selImage-+     |    +--------------+    |     +-"1"-+
-                    |    V              |    |
-                    +-"----+-EXPANDED-+-+--"-+
-                           +-BOLD-----+
-
-
-]]>
-</programlisting>
-
-<para>The add method adds a new item to a tree-view control.</para>
-<variablelist>
-<varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
-<listitem><para>The arguments are:</para>
-<variablelist>
-<varlistentry><term>,</term>
-<listitem><para>The number of commas specifies at which parent the item is to be inserted.
-If you omit this argument, the item is inserted as a root item. Each additional
-comma inserts the item one level deeper than the item inserted previously.
-See the example in the following.
-</para></listitem></varlistentry>
-<varlistentry><term>text</term>
-<listitem><para>The text for the item. If you omit this argument, &quot;&quot; is assumed.
-</para></listitem></varlistentry>
-<varlistentry><term>image</term>
-<listitem><para>The index of the icon image in the tree-view control's bitmap file
-to be used when the item is in the non-selected state. If you omit this argument,
-the icon with index 0 is used.
-</para></listitem></varlistentry>
-<varlistentry><term>selImage</term>
-<listitem><para>The index of the icon image in the tree-view control's bitmap file
-to be used when the item is in the selected state. If you omit this argument,
-the icon specified for <emphasis role="italic">image</emphasis> is used.
-</para></listitem></varlistentry>
-<varlistentry><term>state</term>
-<listitem><para>Specifies the appearance and functionality of the item. It can be a
-combination of the following values, separated by a blank:</para>
-<variablelist>
-<varlistentry><term>EXPANDED</term>
-<listitem><para>The item is currently expanded with all child items visible. This only
-applies to parent items.</para>
-</listitem></varlistentry>
-<varlistentry><term>BOLD</term>
-<listitem><para>The item is shown in bold.</para>
-</listitem></varlistentry>
-</variablelist>
-<para>If you omit this argument, the item is inserted in collapsed and normal
-form.</para>
-</listitem></varlistentry>
-<varlistentry><term>children</term>
-<listitem><para>Indicates whether the item has child items associated with it:</para>
-<variablelist>
-<varlistentry><term>&quot;0&quot;</term>
-<listitem><para>The item has no child items, which is the default.
-</para></listitem></varlistentry>
-<varlistentry><term>&quot;1&quot;</term>
-<listitem><para>The item has one or more child items.</para>
-<para>You can use this argument to
-show an item that does not have any child items, with an expand button. This
-allows you to save memory usage by dynamically loading and displaying the
-child items only when the user expands the item.</para>
-</listitem></varlistentry>
-</variablelist>
-</listitem></varlistentry>
-</variablelist>
-</listitem></varlistentry>
-<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
-<listitem><para>The handle to the new item, or 0 for all other cases.
-</para></listitem></varlistentry>
-<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
-<listitem><para>To get the following tree view:</para>
-<itemizedlist>
-<listitem><para>Peter</para>
-<itemizedlist>
-<listitem><para>Mike</para>
-<itemizedlist>
-<listitem><para>George</para></listitem>
-<listitem><para>Monique</para>
-<itemizedlist>
-<listitem><para>John</para></listitem></itemizedlist></listitem>
-<listitem><para>Chris</para></listitem></itemizedlist></listitem>
-<listitem><para>Maud</para></listitem>
-<listitem><para>Ringo</para></listitem></itemizedlist></listitem>
-<listitem><para>Paul</para>
-<itemizedlist>
-<listitem><para>Dave</para></listitem>
-<listitem><para>Sam</para></listitem>
-<listitem><para>Jeff</para></listitem></itemizedlist></listitem>
-<listitem><para>Mary</para>
-<itemizedlist>
-<listitem><para>Helen</para></listitem>
-<listitem><para>Michelle</para></listitem>
-<listitem><para>Diana</para></listitem></itemizedlist>
-</listitem></itemizedlist>
-<para>The program code should look similar to this:</para>
+<section id="mthAddClsTreeView" xreflabel="add"><title>add</title>
+<indexterm><primary>add</primary></indexterm>
+<indexterm><primary>TreeView class</primary><secondary>add</secondary></indexterm>
+<programlisting>
+<![CDATA[
+          +---+
+          V   |
+>>--add(--+---+-+-------+-+-------+-+----------+-+-------+-+---------+-+-------+--)---><
+          +-,-+ +-,-txt-+ +-,-img-+ +-,-selImg-+ +-,-opt-+ +-,-child-+ +-,-usr-+
+]]>
+</programlisting>
+
+<para>
+  Adds an item with all its attributes to a tree-view control.
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+  <listitem>
+  <para>
+    The arguments are:
+  </para>
+    <variablelist>
+      <varlistentry><term>, [optional]</term>
+      <listitem>
+      <para>
+        The number of commas specifies at which parent the item is to be inserted. If you omit this argument, the item is
+        inserted as a root item. Each additional comma inserts the item one level deeper than the item inserted
+        <emphasis role="italic">previously</emphasis>.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>txt [optional]</term>
+      <listitem>
+      <para>
+        The text for the label of the item. If this arugment is omitted then the empty string is used as the text.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>img [optional]</term>
+      <listitem>
+      <para>
+        Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list for the icon
+        image to use when the item is in the nonselected state.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>selImg [optional]</term>
+      <listitem>
+      <para>
+        Index in the tree-view control's normal <link linkend="mthSetImageListClsTreeView">image</link> list for the icon
+        image to use when the item is in the selected state.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>opt [optional]</term>
+      <listitem>
+      <para>
+        A list of 0 or more of the following keywords separated by spaces, case is not significant. If this argument is
+        omitted the item state will be normal, not expanded:
+      </para>
+      <para>
+        <simplelist type='vert' columns='3'>
+          <member>BOLD    </member>
+          <member>EXPANDED</member>
+        </simplelist>
+        <variablelist>
+          <varlistentry><term>BOLD</term>
+          <listitem>
+          <para>
+            The item is shown bolded.
+          </para>
+          </listitem></varlistentry>
+          <varlistentry><term>EXPANDED</term>
+          <listitem>
+          <para>
+            The item's list of child items is currently expanded, that is, the child items are visible. Only parent items can
+            have this state.
+          </para>
+          </listitem></varlistentry>
+        </variablelist>
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>children [optional]</term>
+      <listitem>
+      <para>
+        Used to signal the underlying tree-view control that the item has children, even if no children are inserted. Specify
+        1 to signal that the item does have children. This is really only useful if the tree-view has the <xref
+        linkend="styButtonsClsTreeView"/> style, see the remarks section. When this argument is omitted or less than 1, it is
+        in effect ignored.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>usr [optional]</term>
+      <listitem>
+      <para>
+        Associates the specified value with the tree-view item being added. This value is commonly refered to as the
+        <emphasis role="italic">user data</emphasis> for the item, or as the <emphasis role="italic">item data</emphasis>.
+        This can be any Rexx object that the programmer wants to use. The <link
+        linkend="mthGetItemDataClsTreeView">getItemData</link> method can be used to retrieve this value. The <link
+        linkend="mthSetItemDataClsTreeView">setItemData</link> method, and several other methods, can also be used to set the
+        user data for a tree-view item.
+      </para>
+      </listitem></varlistentry>
+    </variablelist>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
+  <listitem>
+  <para>
+    Returns the handle of the newly added item on success, or zero on error.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
+  <listitem>
+  <para>
+    When a tree-view controls has the BUTTONS style, it displays plus and minus buttons next to <emphasis
+    role="italic">parent</emphasis> items. It does not display the buttons for any item that has no children. However, it is
+    sometimes useful to dynamically insert child items when the button is clicked. Specifying 1 for the <emphasis
+    role="italic">children</emphasis> argument forces the tree-view control to use a plus button for the item, even if the
+    item has no children.
+  </para>
+  <para>
+    Associating a user data value with some or all of a tree-view items can be useful in a number of ways. The <emphasis
+    role="italic">userData</emphasis> argument allows the programmer to assoicate the value at the time the item in added to
+    the tree-view. The <xref linkend="mthSetItemDataClsTreeView"/> method can be used to assign a data value at any time. The
+    <link linkend="mthModifyClsTreeView">modify</link> method can be used to change an item's attributes, including the user
+    data of the item.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
+  <listitem>
+  <para>
+    To get the following tree view:
+  </para>
+  <itemizedlist>
+    <listitem><para>Peter</para>
+    <itemizedlist>
+      <listitem><para>Mike</para>
+      <itemizedlist>
+        <listitem><para>George</para></listitem>
+        <listitem><para>Monique</para>
+        <itemizedlist>
+          <listitem><para>John</para></listitem>
+        </itemizedlist>
+        </listitem>
+        <listitem><para>Chris</para></listitem>
+      </itemizedlist>
+      </listitem>
+      <listitem><para>Maud</para></listitem>
+      <listitem><para>Ringo</para></listitem>
+    </itemizedlist>
+    </listitem>
+    <listitem><para>Paul</para>
+    <itemizedlist>
+      <listitem><para>Dave</para></listitem>
+      <listitem><para>Sam</para></listitem>
+      <listitem><para>Jeff</para></listitem>
+    </itemizedlist>
+    </listitem>
+    <listitem><para>Mary</para>
+    <itemizedlist>
+      <listitem><para>Helen</para></listitem>
+      <listitem><para>Michelle</para></listitem>
+      <listitem><para>Diana</para></listitem>
+    </itemizedlist>
+    </listitem>
+  </itemizedlist>
+  <para>
+    The program code should look similar to this:
+  </para>
 <programlisting>
 <![CDATA[
 ::method initDialog
-  treeView = self~newTreeView("IDC_TREE")
+  treeView = self~newTreeView("IDC_TV_INLAWS")
 
   treeView~add("Peter", , ,"BOLD EXPANDED")
   treeView~add(,"Mike", , ,"EXPANDED")
@@ -470,9 +536,10 @@
 
 ]]>
 </programlisting>
-</listitem></varlistentry>
-</variablelist>
-</section>
+  </listitem></varlistentry>
+</variablelist>
+</section>  <!-- End TreeView::add() -->
+
 
 <section id="child"><title>Child</title>
 <indexterm><primary>Child</primary></indexterm>
@@ -1140,6 +1207,64 @@
   </listitem></varlistentry>
 </variablelist>
 </section>  <!-- End TreeView::getItemData() -->
+
+
+<section id="mthGetItemTextClsTreeView" xreflabel="getItemText"><title>getItemText</title>
+<indexterm><primary>getItemText</primary></indexterm>
+<indexterm><primary>TreeView class</primary><secondary>getItemText</secondary></indexterm>
+<programlisting>
+<![CDATA[
+>>--getItemText(--hItem--)-----------------------><
+]]>
+</programlisting>
+
+<para>
+  Retrieves the text of the specified tree-view item.
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+  <listitem>
+  <para>
+    The single argument is:
+  </para>
+    <variablelist>
+      <varlistentry><term>hItem [required]</term>
+      <listitem>
+      <para>
+        The tree-view item to retrieve the text from.
+      </para>
+      </listitem></varlistentry>
+    </variablelist>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
+  <listitem>
+  <para>
+    The return is the text assigned to the specified tree-view item.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
+  <listitem>
+  <para>
+    This example retrieves the text of the selected item:
+<programlisting>
+<![CDATA[
+
+  tv = self~newTreeVies(IDC_TV_BOOK)
+
+  selectedItem = tv~selected
+  if selectedItem == 0 then do
+      say 'No item is selected'
+  end
+  else do
+      say 'The text for the selected item is:' tv~getItemText(selectedItem)
+  end
+
+]]>
+</programlisting>
+  </para>
+  </listitem></varlistentry>
+</variablelist>
+</section>  <!-- End TreeView::getItemText() -->
 
 
 <section id="hittest"><title>HitTest</title>
@@ -2387,33 +2512,45 @@
 active edit item.</para>
 </section>
 
-<section id="root"><title>Root</title>
-<indexterm><primary>Root</primary></indexterm>
+<section id="mthRoot"><title>root</title>
+<indexterm><primary>root</primary></indexterm>
+<indexterm><primary>TreeView</primary><secondary>root</secondary></indexterm>
 <programlisting>
 <![CDATA[
 >>--root-----------------------------------------><
-
-
-]]>
-</programlisting>
-
-<para>The Root method retrieves the first or topmost
-item of the tree-view control.</para>
-<variablelist>
-<varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
-<listitem><para>The handle to the first item, or 0 in all other cases.
-</para></listitem></varlistentry>
-<varlistentry><term><emphasis role="bold">Example:</emphasis></term>
-<listitem><para>The following example displays the name of the root item:
-<programlisting>
-<![CDATA[
-::method RootName
-  curTree = self~newTreeView("IDC_TREE")
-  itemInfo. = curTree~itemInfo(curTree~Root)
-  say ItemInfo.!Text
-]]>
-</programlisting>
-</para></listitem></varlistentry>
+]]>
+</programlisting>
+
+<para>
+  The <emphasis role="italic">root</emphasis> method retrieves item handle of the first or topmost item of the tree-view
+  control.
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+  <listitem>
+  <para>
+    This method has not arguments.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
+  <listitem>
+  <para>
+    The handle to the first or topmost item on success. 0 on error.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
+  <listitem>
+  <para>
+    The following example displays the text, or label, of the root item:
+<programlisting>
+<![CDATA[
+::method rootLabel
+  tv = self~newTreeView(IDC_TV_ORG_CHART)
+  say 'The head of the organization is' tv~getItemText(tv~root)
+]]>
+</programlisting>
+  </para>
+  </listitem></varlistentry>
 </variablelist>
 </section>
 
@@ -2694,6 +2831,175 @@
 </para></listitem></varlistentry>
 </variablelist>
 </section>
+
+
+<section id="mthSortChildrenCB" xreflabel="sortChildrenCB"><title>sortChildrenCB</title>
+<indexterm><primary>sortChildrenCB</primary></indexterm>
+<indexterm><primary>TreeView class</primary><secondary>sortChildrenCB</secondary></indexterm>
+<programlisting>
+<![CDATA[
+>>--sortChildrenCB(--+---------+--+-----------+--+---------+--)----------------><
+                     +--hItem--+  +-,-mthName-+  +-,-param-+
+]]>
+</programlisting>
+
+<para>
+  The <emphasis role="italic">sortChildrenCB</emphasis> method causes the tree-view to sort the children of the specified
+  parent tree-view item by invoking a comparison method in the Rexx dialog. The Rexx comparsion method determines the order
+  of the children items.
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+  <listitem>
+  <para>
+    The arguments are:
+  </para>
+    <variablelist>
+      <varlistentry><term>hItem [optional]</term>
+      <listitem>
+      <para>
+        The parent item of the children to be sorted. If this argument is omitted, the <link linkend="mthRoot">root</link>
+        item is used as the parent.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>mthName [optional]</term>
+      <listitem>
+      <para>
+        The name of the comparsion method in the Rexx dialog to be invoked to determine the relative order of two tree-view
+        items. If this argument is omitted, a default method name of <emphasis role="italic">onSortChildrenCB</emphasis> is
+        used.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>param [optional]</term>
+      <listitem>
+      <para>
+        The <emphasis role="italic">param</emphasis> argument can be any object the programmer wants to use. If the argument
+        exists, it is passed as the third argument to the <emphasis role="italic">mthName</emphasis> comparison method. If
+        the argument is omitted, the <computeroutput>.nil</computeroutput> object is passed as the third argument.
+      </para>
+      </listitem></varlistentry>
+    </variablelist>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Return value:</emphasis></term>
+  <listitem>
+  <para>
+    Returns true on success, false on error.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
+  <listitem>
+  <para>
+    The tree-view control allows the user (the Rexx programmer) to associate a user <link
+    linkend="mthSetItemDataClsTreeView">data</link> value with any, or all, of the tree-view items. The data value can be any
+    ooRexx object. For the <emphasis role="italic">sortChildrenCB</emphasis> method to work correctly, the programmer must
+    associate a data value with each tree-view item.
+  </para>
+  <para>
+    The specifics on the user data value and what the programmer needs to do are dependent on the type of sort specified. See
+    the relevant section below for a Rexx sort or an internal sort.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">The onSortChildrenCB method</emphasis></term>
+  <listitem>
+  <para>
+    As the tree-view control needs to compare two items it will invoke, through the ooDialog framework, the comparison method
+    in the Rexx dialog named by the <emphasis role="italic">mthName</emphasis> argument. The return from the Rexx method
+    determines how the items are sorted.
+  </para>
+  <para>
+    The comparison method must return a whole number and this value is passed on to the tree-view control. The method must
+    return a negative value if the first item should come before the second item, a postive number if the first item should
+    come after the second item, and 0 if the items are equivalent.
+  </para>
+  <para>
+    The arguments passed to the comparsion method are the user data items associated with the two items beig compared. This
+    is why the sore will not work correctly if tree-view items are not assigned a user data item. The comparison method
+    should be coded as follows:
+  </para>
+
+<programlisting>
+<![CDATA[
+::method onSortChildrenCB unguarded
+  use arg data1, data2, param
+]]>
+</programlisting>
+
+  <variablelist>
+    <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term>
+    <listitem>
+    <para>
+      The comparison method receives 3 arguments:
+    </para>
+    <variablelist>
+      <varlistentry><term>data1</term>
+      <listitem>
+      <para>
+        The user <emphasis role="italic">data value</emphasis> assigned to the first tree-view item to be compared. This data
+        value is the value the programmer assigned to the item using the <xref linkend="mthSetItemDataClsTreeView"/>, <link
+        linkend="mthInsertClsTreeView">insert</link>, <link linkend="mthaddtc">add</link>, etc., methods.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>data2</term>
+      <listitem>
+      <para>
+        The user <emphasis role="italic">data value</emphasis> assigned to the second tree-view item to be compared.
+      </para>
+      </listitem></varlistentry>
+      <varlistentry><term>param</term>
+      <listitem>
+      <para>
+        The <emphasis role="italic">param</emphasis> argument passed to the <emphasis role="italic">sortChildrenCB</emphasis>
+        method, if it exists. If it was omitted, the param argument will be the <computeroutput>.nil</computeroutput>
+        object.
+      </para>
+      </listitem></varlistentry>
+    </variablelist>
+    </listitem></varlistentry>
+    <varlistentry><term><emphasis role="bold">Return:</emphasis></term>
+    <listitem>
+    <para>
+      The return must be a whole number. Less than 0 places the first item before the second item, greater than 0 places the
+      first item after the second. Return 0 if the two items are equivalent. The programmer determines what number to return
+      based on the 2 user data values passed to the method.
+    </para>
+    </listitem></varlistentry>
+  </variablelist>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Details</emphasis></term>
+  <listitem>
+  <para>
+    Raises syntax errors when incorrect usage is detected.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
+  <listitem>
+  <para>
+    This example sorts the children of the selected item in descending alphabetic order:
+<programlisting>
+<![CDATA[
+
+::method onSortChildren unguarded
+    expose tv
+
+    selectedItem = tv~selected
+    if selectedItem == 0 then selectedItem = tv~root
+
+    ret = tv~sortChildrenCB(selectedItem, rexxSort)
+
+
+::method rexxSort unguarded
+    use arg itemData1, itemData2, userParam
+
+    -- Reverse sort:
+    return itemData2~compareTo(itemData1)
+
+
+]]>
+</programlisting>
+  </para>
+  </listitem></varlistentry>
+</variablelist>
+</section>  <!-- End TreeView::sortChildrenCB() -->
 
 
 <section id="subclassedittrc"><title>subclassEdit</title>