Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange problem with Treeview SelectedItem property
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00812987
Message ID:
00815453
Views:
20
>
>.SelectedItem = .Nodes(1)
>cnodekey = .SelectedItem.key
>.SelectedItem = .NULL.
>? .Nodes(cnodekey).Text
>
My efforts were with lisview (appologies for mixing ocx's). A .NULL. variable is not an object (where as: a node is!) - so that may explain the datatype errors.

I looked at my "episode" and found that this is how I got the data error.
.SelectedItem = .NULL.
?.SelectedItem.Text

I may have miswrote the data failure I experience with listview. After you try it that way - check it from this angle:
.SelectedItem.Selected=.f.
?.SelectedItem.Text

>
>Also .SelectedItem can certainly have a .NULL. value when the tree is first populated. I don't know exactly when this gets assigned but it could be as late as Tree.GotFocus()
>
Yes - I think that Onfocus (oops, GotFocus) is when it happens.

>Regards,
>Viv
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform