Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView Node Enabled
Message
From
02/05/2002 16:00:21
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00651317
Message ID:
00652097
Views:
29
Caroline, I ran into this about a year ago or so. What I eventually did was to track the currently active node in a form property, and when the user clicked on a node that I was disallowing (you also have to track that - maybe in an array), I simply reset the current node back to the last one that was active.

I'd love to have found a cleaner and simpler way, but I'm afraid I couldn't. Also admittedly, there is a small highlight bounce from one to the other, but at least it does work.

Alan

>>>>>Thanks Cetin.
>>>>>It's interesting that I managed to find documentation to the Node.Enabled property if it's not really there - maybe they took it out?
>>>>>
>>>>>From the TreeView help
>>>>>Add Method (Nodes Collection)
>>>>>
>>>>>Dim nodX As Node   ' Declare the object variable.
>>>>>Dim I as Integer   ' Declare a counter variable.
>>>>>For I = 1 to 4
>>>>>   Set nodX = TreeView1.Nodes.Add(,,,"Node " & Cstr(i))
>>>>>   ' Use the reference to set other properties, such as Enabled.
>>>>>   nodX.Enabled = True
>>>>>   ' Set image property to image 3 in an associated ImageList.
>>>>>   nodX.ExpandedImage = 3
>>>>>Next I
>>>>>
>>>>
>>>>Caroline,
>>>>Where is this treeview help or sample (hoping really it's true).
>>>>With the help I can access there is no enabled property for node.
>>>>Cetin
>>>
>>>Cetin,
>>>I've always found the TreeView help a bit lacking as certain properties are there but are just not mentioned in the help ie the Nodes BackColor to name just one.
>>>
>>>The above I found in the standard help for the TreeView (Right Click on the control then select Help) by searching on enabled.
>>>
>>>But I guess that as it throws an error its not really there :-)
>>
>>Caroline,
>>I found it. Were looking to same help but didn't notice that code at bottom. FYI though the code is VB code it doesn't work in VB either :)
>>Cetin
>
>Well that's something at least, it would be a bit annoying if it did!
>Thanks for all your help I'll try to do the disabling another way.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform