# TreeItem()

Create a new tree item.

## Usage

newItem = TreeItem( parent, name, sort,
popup, tooltip=None, whatsthis=None,
helpURL=None, path=None, chkFlag=None,
click2=None, clobber=False,onExit=None )

## Parameters

parent (string)
The item parent can be root or any created tree item.
name (string)
The tree item name. This name will appear in the Data Tree.
sort (string)
If true, the children will be sorted by name.
popup (tuple)
A set of (functionName, function) pairs designed for this tree item.
tooltip (string)
Tooltip help information, also known as bubble. The content of this argument is displayed in a small dynamic box placed opened above the Data Tree, when the cursor remains at the Data Tree for short time. This is typically a short phrase.
whatsthis (string)
Whatsthis help information. When you click on the whatsthis icon followed by clicking on this Data Tree, a small box opens above the data-tree and content of this argument is displayed in it. This is typically a short sentence or two, which provides more information than that given by the tooltip argument. The whatsthis argument is a rich text format, which means you can embed many of the HTML tags, such as <br> for line separator and <b> for bold.
helpURL (string)
This is the HTML-URL address containing detailed help on the Data Tree. When you press the F1 key while the cursor is on top of this Data Tree, the assistance help system opens and displays this page.
path (string)
Path of Data Tree in the data base.
chkFlag (boolean)
If this flag is true, the routine will create a CheckListItem in the Data Tree,or else it will create a ListViewItem.
click2 (string)
A functionName from popup which will be invoked when you double-click the tree item.
clobber (boolean)
The tree item will be redrawn if clobber is true.
onExit ((tuple) or (function))
A functionName with arbitary arguments which will be invoked when the panel of this tree item is closed.

## Return Value

newItem (Tree-item object)
New tree item object created by TreeItem( ).

## Errors

• The parent Data Tree must exist.
• The function in the popup must be already defined
• The function called in the onExit must be already defined.

## Description

This routine adds a new item to the Data Tree. For example,
item= TreeItem( parent = Global,
name = 'Problem Description',
tooltip = 'Define the problem',
whatsthis = 'Open a panel to define the problem\n'
'and equations to be solved\n',
helpURL = 'main.htm#problem description',
sort = FALSE,
popup = (( 'Open', cmdOpenProblemDescription ),),
click2 = 'Open',
clobber = False,
onExit = ( cmdDoAutoSolutionStrategy,() )
)