Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tree control that can handle more than 65000 items?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00612390
Message ID:
00613033
Views:
15
>I actually was thinking that creating an external holder for what's in the tree might be helpful for some other parts of the program. The trouble is that it doesn't get rid of the problem. If the user expands all the nodes, I'm right back where I started.
>

Michelle,
Go ahead and do this. There isn't a limit to the number of nodes with the standard treeview control that I could. I created one with 65538 nodes.

However, the limit that others have posted about on this thread does exist with using either the Count property of the Nodes collection or the Index property of the Node itself. As posted, both are 16-bit integers.

When you get to a number larger than the range for a 16-bit integer (0xFFFF or 65535), those properties start reporting from 0 again. Ex.
? Treeview.Nodes('Node 65536').Index  && reports 0
? Treeview.Nodes('Node 65537').Index  && reports 1
? Treeview.Nodes('Node 65538').Index  && reports 2
Using MSKB#Q182231 as a guide, you can get the real count using the following code:
declare integer SendMessage in win32api integer, integer, integer, integer
lnCount = SendMessage(Treeview.Hwnd,0x1105,0,0)
If you always use the variant index to access the node, I believe you can have as many as memory allows. The variant index is either the same as the text displayed on the node or it is some other unique string passed to the Add method of the Nodes collection to identify the node.

There is also a problem with the scroll bar when you have too many Nodes. It doesn't behave correctly.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform