PM_TreeListNodeActivate

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

Const.PM_TreeListNodeActivate

The Const.PM_TreeListNodeActivate message is sent to a cTreeListBox when the user activates a node.

Parameters

Name Description
nType = wParamNode type of the node being activated.
hItem = lParamItem handle of the node being activated.

Returns

Unused (the Framework ignores the return value of this message)

Comments

Nodes can be activated in many ways. By pressing the "Enter" key at any time for all nodes, by expanding using double-click for parent nodes and on double-click for leaf nodes.

Example

This example shows how the tree list box in "Quick Report Navigator" traps the PM_TreeListNodeActivate message and opens the report order dialog.

cTreeListBox: lbCategory
   Message Actions
       On PM_TreeListNodeActivate
          If wParam = 2
              Call InfoService.QuickReportStart( TreeListNodeIdFromItem
                ( lParam ) || '@' )
C# code

This example shows how the tree list box traps the Const.PM_TreeListNodeActivate message and activate the node on double click

private void lbSchedule_MessageActions(ref SalMessage message)
{
	#region Actions
	switch (message.Code)
	{
		case Const.PM_TreeListNodeActivate:
			message.Handled = true;
			this.TreeListNodeActivate(Sys.wParam, Sys.lParam);
			break;
	}
}

public SalNumber TreeListNodeActivate(SalNumber nType, SalNumber hItem)
{
	#region Actions
	using (new SalContext(this))
	{
		switch (nType)
		{
			<more code>
			case Const._NODETYPE_Report:
			// Populate using current selection
				SendMsgToHeader(Const.PAM_User, 0,
Int.PalStrToNumber(lbSchedule.TreeListNodeIdFromItem(hItem))); break; } } return 0; #endregion }