Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview or MShflexgrid
Message
From
06/12/2006 08:18:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/12/2006 08:10:29
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01174842
Message ID:
01175172
Views:
17
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 && Expand all nodes for easy view
>>    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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform