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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treeview again 1

Status
Not open for further replies.

edderic

Programmer
May 8, 1999
628
I have in a Treeview :

- Akte 2
- Que 1:
- Playback 1:
-Move1
-Move3
-Move4
- Playback 2:
-Move5
-Move6
-Move7
- Akte 3
- Que 2:
- Playback 2 :
-Move4
-Move1
-Move3
Ho can I set for each Playback 2 the Forecolor on Red and for each Playback 1 the forecolor Blue

Thanks

Eric
Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Hi Eric.

You can do something like:

Dim x as integer

x = 1

While x <= tvw.Nodes.Count
if tvw.Nodes(x).Text = &quot;Payback 1&quot; then
tvw.Nodes(x).Forecolor = RGB(0, 0, 255)
else if tvw.Nodes(x).Text = &quot;Payback 2&quot; then
tvw.Nodes(x).Forecolor = RGB(255, 0, 0)
else
end if
x=x+1
WEnd

This should do it
Let me know if u need more help
 
Jeezus problems with the treeview !!!

I have different icons in a imagelist control ,ho set i icon1 To Ques and icon2 to Playbacks etc...

Eric


Thanks Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Hi again :)

I assume you want to set the icons by the time you build the treeview right?

If so, before you add a specific node, just test if it will be a Ques or Playback. Something like:

if Text_For_New_Node = &quot;Ques...&quot; then
varimage = &quot;icon1&quot; 'icon1 is the name of one of your imgs
else if Text_For_New_Node = &quot;Playback...&quot; tehn
varimage = &quot;icon2&quot;
End if

I don't know exactly what is Ques and Playback but you'll probably have a way of identifying them.

After that just add the new node:

Set mNode = tvw.Nodes.Add(Relative_Node, tvwChild, Node_Key, Node_Text, varImage)

This way according to the type of node you want to add to the treeview the varimage will be different and so will the icon on the treeview.

Hope this helps.
 
Daimaou

The program is a automation for Theater Shows ,Ques are the decors and Moves are the panels of decors ,this programma is the interface with a touchScreen with Start the Playback with PLS (serial port to a externe machine) its do the moves of a decor Up or Down

Thanks for the help

Eric Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top