Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview
Message
From
19/07/1999 12:03:16
 
 
To
16/07/1999 19:29:08
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00241602
Message ID:
00243144
Views:
30
>>>>>How do i disable a treeview?
>>>
>>>>Is there something wrong with the .Enabled property? Works for me.
>>>
>>>I would expect that it would work for me too. But it doesn't. My treeview is still responding to the mouse click. I searched the whole UT for an awnser and found many members with the same problem. There was nobody who could solve the problem or couldn't even explain the reason.
>>
>>Which version of VFP and the TreeView are you using? VFP6/SP3 and TV6 work OK.
>
>
>VFP6/SP3 and TV6 and IL6. I created a new form just to make sure that i'm using the newest versions. There is only the treeview, the imagelist and a button to disable the treeview. Same result. The treeview is responding to the mouseclick no matter wether it's enabled or not. I also tried all kinds of tricks i found in UT. It's really sad.

Upon closer examination, what I found was that you have to use the OBJECTS Enable property:
thisform.TreeView.Object.Enabled = .F.

This will disbale clicking on the TreeView. You have to use the regular .Enabled property to stop being able to tab to the TreeView:
thisform.TreeView.Enabled = .F.

I hadn't realized I was using the object property, (buried inside a WITH/ENDWITH). You have to do both to stop total access to the TreeView. I wasn't aware about the tabbing not being stopped, so thanks for the "heads-up" on that one, wherever that came from.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform