Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview Nodes
Message
From
30/09/2005 03:05:39
 
 
To
29/09/2005 23:41:21
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01054749
Message ID:
01054764
Views:
23
This message has been marked as the solution to the initial question of the thread.
>Dear Experts
>
>I use following codes to add data in Treeview control
>
>SELECT myTree
>#DEFINE tvwFirst	0
>#DEFINE tvwLast		1
>#DEFINE tvwNext		2
>#DEFINE tvwPrevious	3
>#DEFINE tvwChild	4
>
>WITH Thisform.OleTreeView.Nodes
>	SCAN
>		IF Empty(ParentID)
>			.Add(,tvwFirst,NodeId,code+ ' '+Trim(NodeText))
>		ELSE
>			.Add(ParentID,tvwChild,NodeId,code +' '+Trim(NodeText))
>		ENDIF
>	ENDSCAN
>ENDWITH
>
>
>How to show all nodes text forecolor=rgb(225,0,0) and
>How to show all child text forecolor=rgb(0,255,0)
>
>Please help
SELECT myTree
#DEFINE tvwFirst	0
#DEFINE tvwLast		1
#DEFINE tvwNext		2
#DEFINE tvwPrevious	3
#DEFINE tvwChild	4

WITH Thisform.OleTreeView.Nodes
	SCAN
		IF Empty(ParentID)
		   oNode = .Add(,tvwFirst,NodeId,code+ ' '+Trim(NodeText))
                   oNode.ForeColor = RGB(255,0,0)
		ELSE
		   oNode = .Add(ParentID,tvwChild,NodeId,code +' '+Trim(NodeText))
                   oNode.ForeColor = RGB(0,255,0)
		ENDIF
	ENDSCAN
ENDWITH
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform