Click to See Complete Forum and Search --> : keep select node in tree control highlighted


smchristensen
March 26th, 2001, 03:13 PM
I am trying to keep the select node highlighted.
I can keep it selected and highlighted this way but when I click on another node this stays selected. Then I have two nodes selected.

private Sub cmdMoveSlideDown_Click()
Dim currIndex as Integer
Dim mNode as Node

currIndex = getCurrentSlideIndex
currentPackage.updateSlide currIndex, 1
loadSlideList

If currIndex + 1 > tv.Nodes.Count - 1 then

set mNode = tv.Nodes.Item(2)
mNode.Selected = true
'mNode.BackColor = vbBlue

'tv.Nodes.Item(2).Selected = true
'tv.Nodes.Item(2).BackColor = vbBlue
else
set mNode = tv.Nodes(currIndex + 2)
mNode.Selected = true
' mNode.BackColor = vbBlue
'tv.Nodes.Item(currIndex + 2).Selected = true
'tv.Nodes.Item(currIndex + 2).BackColor = vbBlue
End If
needToReloadList = true
updateMenus
End Sub

Cakkie
March 27th, 2001, 01:08 AM
The treeview control has a property called HideSelection wich hides the selection when the control doesn't has the focus. Set this property to false and the selection will remain visible.

Tom Cannaerts
slisse@planetinternet.be

The best way to escape a problem, is to solve it.