Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treeview Nodes
Message
 
À
29/09/2005 23:41:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01054749
Message ID:
01054764
Vues:
24
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform