hi,
thank you very much,
about do form,
main
WITH .Nodes.click(do form myform)&& not work
>1) Yes but syntax is wrong.
>
>WITH .Nodes.Add('r1s1',tvwChild,"r1s1_newchildkey","R1 Series 1 aaaa")
> .BackColor = RGB(0,0,255)
> .ForeColor = Rgb(255,255,0)
>ENDWITH
>2) Yes. You can do that in nodeclick.
>Cetin
>
>>hi,
>>
>>1.it is posssible to add new node to child node as under
>>
>>WITH .Nodes.Add('R1 Series 1',tvwChild,"r1s1","R1 Series 1 aaaa")
>> .BackColor = RGB(0,0,255)
>> .ForeColor = Rgb(255,255,0)
>> ENDWITH
>>2.can i run myform include any child node as do form myform
>>
>>thanks
>>>>>
>>>>>TEXT TO m.strShape TEXTMERGE PRETEXT 8
>>>>>shape append
>>>>> new adChar(10) as Region,
>>>>> new adInteger as RegionID,
>>>>> ((shape append
>>>>> new adChar(20) as Series,
>>>>> new adInteger as RegionID )
>>>>> as ls relate regionID to RegionID)
>>>>>ENDTEXT
>>>>
>>>>
>>>>thanx
>>>>
>>>>Can you highlight more ?
>>>>How can i do the above without using shape ?
>>>>
>>>>m.ors1 = createobject("adodb.recordset")
>>>>m.ors1.fields.append("region",adchar,10)
>>>>m.ors1.fields.append("regionid",adinteger)
>>>>
>>>>now how to add the series recordset and relate?
>>>>
>>>>suhashegde
>>>
>>>BTW if all you need is Regions and series then do with TV. It's easier. You just need to set backcolor property as you wish. ie:
>>>
>>>#Define tvwFirst 0
>>>#Define tvwLast 1
>>>#Define tvwNext 2
>>>#Define tvwPrevious 3
>>>#Define tvwChild 4
>>>
>>>Public oForm
>>>oForm = Createobject('myForm')
>>>oForm.Show()
>>>
>>>With oForm.Tree
>>> .Left = 10
>>> .Top = 10
>>> .Width = 200
>>> .Height = 200
>>> .Nodes.Add(,tvwFirst,"r1",'Region 1')
>>> .Nodes.Add(,tvwFirst,"r2",'Region 2')
>>>
>>> WITH .Nodes.Add('r1',tvwChild,"r1s1","R1 Series 1")
>>> .BackColor = RGB(0,0,255)
>>> .ForeColor = Rgb(255,255,0)
>>> Endwith
>>> WITH .Nodes.Add('r1',tvwChild,"r1s2","R1 Series 2")
>>> .BackColor = RGB(255,0,0)
>>> .ForeColor = Rgb(255,255,0)
>>> Endwith
>>>
>>> WITH .Nodes.Add('r2',tvwChild,"r2s1","R2 Series 1")
>>> .BackColor = RGB(0,0,255)
>>> .ForeColor = Rgb(255,255,0)
>>> Endwith
>>> WITH .Nodes.Add('r2',tvwChild,"r2s2","R2 Series 2")
>>> .BackColor = RGB(255,0,0)
>>> .ForeColor = Rgb(255,255,0)
>>> Endwith
>>>
>>> For Each oNode In .Nodes
>>> oNode.Expanded = .T.
>>> Endfor
>>>Endwith
>>>
>>>Define Class myForm As Form
>>> oNode= .Null.
>>> Add Object Tree As OleControl With ;
>>> Name = 'Tree',OleClass='MSComCtlLib.TreeCtrl'
>>>
>>> Procedure Init
>>> With This.tree
>>> .linestyle = 1
>>> .Font.Name = 'Times New Roman'
>>> .Font.Size = 10
>>> .indentation = 5
>>> Endwith
>>> Endproc
>>>Enddefine
>>>
>>>Cetin