General information
Category:
ActiveX controls in VFP
Title:
Have no selecteditem in treeview..
Hi,
How can I set the selecteditem to nothing or set it to the root
when i have a treeview control?
Currently all elements are added at the root level. I though about adding a "root" node at the top but this might confuse the users.
In this situation there is no way to not select an item.
I managed to partially solve the problem by placing this code in the click event:
IF Thisform.otree.SelectedItem.Key==thisform.lcLastSelectedItemKey AND !EMPTY(thisform.lcLastSelectedItemKey)
FOR lnI=1 TO Thisform.otree.nodes.Count
Thisform.otree.Nodes[lnI].Selected=.F.
ENDFOR
thisform.lcLastSelectedItemKey=""
*Thisform.otree.SelectedItem.Key=""
ELSE
thisform.lcLastSelectedItemKey=Thisform.otree.SelectedItem.Key
ENDIF
When I click off the current node (to the white space for example) the node
no longer appears selected which is what I want but the SelectedItem property is still set to the node..
Any Ideas?
BR
Tim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only