Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiCreateTreeItem

hiCreateTreeItem(
s_itemName
[ g_description ]
[ g_itemIcon ]
[ g_selectionIcon ]
[ g_expandedIcon ]
[ g_expandedSelectionIcon ]
)
=> r_treeItem / nil

Description

Creates a new item for a tree. Use hiTreeAppendItem or hiTreePrependItem to attach the item to a tree.

For an overview of the tree table field, see hiCreateTreeTable.

Arguments

s_itemName

The name of the item, specified as a symbol.

This symbol is the handle to the item and can be evaluated to return the item structure.

g_description

Description of the item that is displayed in the tree table. Specify the description as a list of one or more strings, symbols, integers, or floating-point numbers.

g_itemIcon

Icon that is displayed on the left of the item description.

You can also set the icon with the hiSetTreeItemIcons function.

g_selectionIcon

Icon that g_itemIcon changes to when the item is selected. This argument is currently ignored.

g_expandedIcon

Icon that is displayed when the item is expanded.

You can also set the expanded icon with the hiSetTreeItemIcons function.

g_expandedSelectionIcon

Icon that is displayed when the item is expanded and selected. This argument is currently ignored.

Values Returned

r_treeItem

Handle to the tree item.

nil

The item was not created.

Additional Information

You can specify a tooltip for a tree item by setting the hiToolTip property on r_treeItem (the return value of hiCreateTreeItem). The value of the hiToolTip property can either be a string or a list of strings. If it is one string, that string is the tooltip for all columns of the tree item. If it is a list of strings, the first string is the tooltip for the first item in g_description, the second is the tooltip for the second item in g_description, and so on. If there are fewer tooltip items than the number of columns, the last tooltip string is applied to the remaining columns. For example:

putprop _i908259_0 (list "one" "two" "three" "four") ’hiToolTip

specifies tooltips for all four columns of a tree item.

putprop _i908259_1 "tooltip for all cols except those w/o description" ’hiToolTip

specifies one tooltip that applies to all columns of the tree item.

putprop _i908259_3 (list nil "two" "tooltip for three and four") ’hiToolTip

specifies that the first column has no tooltip, the second column has the tooltip "two", and the last two columns have the last string as the tooltip.

You can specify a callback, to be called when a tree item is double-clicked, by setting a property on the tree table field.

This function should not be built into a context. If it is in a context file, it should be within a function, which runs at run-time, instead of being inline, which runs when the context is built.

Related Topics

Form and Field Functions

hiTreeAppendItem

hiTreePrependItem

hiTreeRemoveItem

hiCreateTree

hiSetTreeItemIcons

hiItemInsertTree

hiCreateTreeTable

hiGetTreeItems


Return to top
 ⠀
X