Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview - Move in cursor based on current node
Message
From
07/10/2004 17:44:45
 
 
To
07/10/2004 14:11:13
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00949603
Message ID:
00949736
Views:
11
Now I have to assign something like STR(x) to it as my key expression is integer-based. Am I looking at this wrong?

Briefly, this is how I do it.

Since a TreeView is used to represent hierarchical data, I define an array in the TreeView's Init that defines the hierarchy like so:
*** Set up the array property for the Treeview
*** And then load the top level nodes
*** The columns define the data for a level of the hieracrchy as follows:
*** col 1: Alias name that supplies the data
*** col 2: Name of PK field in that alias
*** col 3: Name of FK field that relates date at this level of the hierarchy to its parent
*** col 4: Expression to use to populate the Node text 
*** col 5: name of alias that hold data for parent node. This is required because in some
***        implementations (like customers) a single parent node can have child nodes that
***        come from 2 different data source so we need some way to link heterogenous children
***        to a common parent
*** col 6: Name of the entity at this level of the hierarchy. Required to build context sensitive 
***        menus on right click
*** col 7: Name of data container class to instantiate on the right side of the form for this node
Then I construct the node key for each node in the Tree like so:
AliasName + [*] + TRANSFORM( Alias.PK ) + [*] + TRANSFORM( Alias.FK )
That way, I can use GETWORDNUM() to parse out the various elements of the Node Key in the TreeView's NodeClick() event so I can do whatever I need to.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform