Omnis Technical Note TNNO0014

$tag and $drawinactive Properties of a Tree List Node

For Omnis Studio 3.1
By UK Support

$tag and $drawinactive are two new properties added to tree lists for Omnis Studio 3.1. The following technical note describes what they are used for and how to use them. The accompanying library demonstrates their use.

$tag
$tag is a character string that is developer defined. You can put whatever you want in this. It is basically a character version of $ident. There is one for each node.

$drawinactive
$drawinactive is a property of a node and when set allows the node to be drawn in a disabled state, i.e. The text is grey and the expand/collapse box is hidden. It is a convenient way to show a node as disabled. Please note that although the property is drawn as disabled, it is still as active as any other node.

Both of these properties are runtime properties and can be seen in the property inspector when viewing node attributes. For example, put a breakpoint on any of the tree events that has a node reference pNodeItem, (for example, if your tree nodes have icons, you could use evTreeNodeIconClicked). When you click on the node and reach the breakpoint, open the F9 window and right click on pNodeItem, then click on Variable, this will open the property inspector and you will see the two properties listed.

How to use the Library

Open the library and follow the instructions on the window.

Download library - tagintreelists.zip