Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView Node Enabled
Message
 
To
01/05/2002 10:51:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00651317
Message ID:
00651331
Views:
21
>>Hi all,
>>
>>I'm trying to set a Node of a TreeView so that its visible but disabled, I assumed that I could just create the node then set its enabled property to false.
>>
>>loNode = .Add(lcParent, lcRelation, lcKey, Alltrim(cDesc), lcImage)
>>loNode.Enabled = .F.
>>
>>But this gives the error "OLE error code 0x80020006: Unknown name.
>>
>>Anybody know what I should be doing?
>>Thanks in anticipation.
>
>Caroline,
>Unfortunately there is no enabled property at node level. You can however prevent expansion by setting expanded=.f. as soon as it's expanded.
>Cetin

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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform