Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement