Link to home
Start Free TrialLog in
Avatar of DerekBlizzard
DerekBlizzard

asked on

Add and remove hilites from a treeview node

I have attached my a portion of my code. What I am doing is hilited the node selected, but then I am trying to remove the bold from the previous node selected. I cannot seem to get this to work..
thanks


Private Sub tvwAFEHiearchy_NodeClick(ByVal Node As Object)
Dim rs As Object

Node.Bold = True
Node.BackColor = 16777088

Set objTree = Me.tvwAFEHiearchy.Object

If IsNull(StrSavedKey) = False And StrSavedKey <> "" Then
If StrSavedKey <> Node.Key Then
objTree.nodes(StrSavedKey).Selected = True
objTree.nodes(StrSavedKey).Bold = False
objTree.nodes(StrSavedKey).BackColor = 16777215
End If
End If

StrSavedKey = Node.Key
ASKER CERTIFIED SOLUTION
Avatar of harfang
harfang
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DerekBlizzard
DerekBlizzard

ASKER

It worked great.

Thanks