Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Have no selecteditem in treeview..
Message
From
11/07/2003 07:07:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Have no selecteditem in treeview..
Miscellaneous
Thread ID:
00809131
Message ID:
00809131
Views:
64
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
Map
View

Click here to load this message in the networking platform