Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
V6s5 - TreeView I just hit dirt, clear it to get paid :-
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00887908
Message ID:
00888002
Views:
13
It seems you need to implement an "IMAGELIST" before you build your tree view.

Check out this download #16575. It runs with VFP 6 through VFP 8- just cancel the version notification. The download shows how to add images to an imagelist and then how to bind the imagelist to a treeview control.

To bind and imagelist control:
MyTreeview.ImageList=thisform.ImageList1. The images are not added to the treeview with LOADPICTURE. They are added to the ImageList control that way, and referenced in the treeview node by their ImageList control key or index. The download will make that clearer for you.

You also have "THIS.PARENT". If your treeview is on a form you can also use "THISFORM". If the treeview is inside a container on a form, then "THISFORM.Container1" would be appropriate.

Play with and read through the download - it might be helpful!



>Hi all
>
>It seems I am the only one who is not able to use a TreeView in my application and I have been trying this out in different manners with as much help from here.
>
>The worst part till date was that I was able to use this TreeView on my machine in a development environment as well as in a deployed stated on my machine. Send it to another machine and the TreeView would stop working.
>
>The best part that happened on this another try (I have stopped counting how many times I have tried to implement treeview for this form) was that on my same machine (no alterations to the environment) though I am still able to successfully use it in development as soon as I created an installer (as always) and set it up on my machine the installed app and specifically this TreeView form started giving errors after which still the development one works.
>
>I had previously tried TreeView the traditional way and was unsuccessful, now I have VFPTree by Jeff Bowman which also doesn't work for me. One thing is certain it is something on my part, what was and is, is still difficult to pinpoint.
>
>The lines creating the problem are as follows:
>
THIS.PARENT.oleTreeView.Images.ADD(,,LOADPICTURE(THIS.PARENT.cGroupIcon))
>THIS.PARENT.oleTreeView.Images.ADD(,,LOADPICTURE(THIS.PARENT.cSingleIcon))
>
>The error generated for both these lines one by one is:
>
Error #: 1426
>Message: OLE error code 0xACTIVECONTROL
>
>In essence these line and the OCX's can't be wrong because they work in the development environment. One thing that does come to mind is that the icon files are not found. Yet they are included in the exe as other graphics files. I have also (though included) tried to put them in the applications folder no luck, the data folder no luck, plus the original files as included in the project are still present.
>
>What makes me hopeful is that 2 different version of the same app, 1 does and the other doesn't work on my machine. The form, if the above errors are ignored works well on it's own just that the empty box of the TreeView is there as a reminder.
>
>Please advise. Any idea. Any straws.
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform