Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tree Control Help

Status
Not open for further replies.

gsrajput

Programmer
Jan 10, 2002
25
US
I would like to know, if any dynamic coloring facility is available in Microsoft's tree control.
 
No, but you can change node background/fore colors directly by setting their value in code.

Also you can set background color for whole Tree controls by calling API function. See FAQ.
 
Juris,
Thanks for replying. Do you 've any code example which I could use?
 
I need a little time to comment code-snippet in English.
 
gsrajput

This thread might have your answer.

thread184-717065

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,
Thanks much for your help. I found later there is backcolor and foreColor property in the tree control.

Please see code below.
e.g.

#define CHILD_NODE_LOC 4
*** Add a node
oNode = Thisform.oletree.Nodes.Add(ALLTRIM (cParentid),CHILD_NODE_LOC,ALLTRIM(cKeyid), ALLTRIM(cSubject),,)

**Change Fore color of the node to the Red
oNode.ForeColor = Rgb(255,0,0)
*** Set Font to bold of a node
oNode.Bold = .t.



G.


:)







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top