castor2003
Programmer
I am trying to use this control for the first time and I was hoping the following code would display one root node with a child along with the + sign. Also, when I run the form it says that references are not complete and hangs up. What could by my problem?
Code:
#DEFINE relatFirst 0
#DEFINE relatlast 1
#DEFINE relatNext 2
#DEFINE relatPrev 3
#DEFINE relatChild 4
** DO LEVEL ONE NODES and Level2 dummies
PUBLIC oTree as OleControl
oTree = thisform.tview
** relative,relationship,key,ctext,image
PUBLIC ARRAY aLevel1(1,4)
aLevel1(1,1) = ""
aLevel1(1,2) = 1
aLevel1(1,3) = 'key'
aLevel1(1,4) = [Districts Not yet Defined]
** Will load level one real data here
FOR i = 1 TO ALEN(aLevel1,1)
oTree.nodes.add(,aLevel1(i,2),aLevel1(i,3),aLevel1(i,4))
NEXT i
***Level 2 dummies
* will load level 2 data below
PUBLIC ARRAY aLevel2(1,4)
FOR i = 1 TO ALEN(aLevel1,1)
oTree.nodes.add('key',4,"KG7","Child1")
NEXT i