Consultor Eletrônico



Kbase P56802: How to expand a Dynamics Treeview node programmatically
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/12/2003
Status: Unverified

GOAL:

How to expand a Dynamics Treeview node programmatically.

FACT(s) (Environment):

Dynamics 2.1A

FIX:

For example in an initializeObject super override in the treeview super procedure, the following code expands the first node. You can then use the other 'getProperty' function parameters (CHILD, PARENT, NEXT, SIBLING, etc.) to navigate the nodes and expand whichever you need with 'ExpandNode'.

DEFINE VARIABLE cNode AS CHARACTER NO-UNDO.
DEFINE VARIABLE hTreeViewOCX AS HANDLE NO-UNDO.

RUN SUPER.

hTreeViewOCX = DYNAMIC-FUNCTION("getTreeViewOCX":U IN TARGET-PROCEDURE).

ASSIGN cNode = DYNAMIC-FUNCTION('getProperty':U IN hTreeViewOCX,"KEY","").

DYNAMIC-FUNCTION("ExpandNode" IN hTreeViewOCX, cNode, TRUE).