Skip to Content
0
Former Member
Jul 27, 2007 at 02:06 PM

Problem with pictures for hierarchy trees

26 Views

Hello

I get a problem with tiles involving trees :

For example in the "pascategoryselect" tile, method "InitializeTree" :

        .LabelEdit = 1
        .Images.Add 1, "", LoadPicture(ResourcePath + "FolderClosed.gif")
        .Images.Add 2, "", LoadPicture(ResourcePath + "FolderOpen.gif")
        .Images.Add 3, "", LoadPicture(ResourcePath + "Leaf.gif")
        .Images.Add 4, "", LoadPicture(ResourcePath + "Iba_comp_prod.gif")
    
        .Nodes.Clear

The '.Image.Add ..." lines crash, the Err.Description statement is "Automation Error, Catastrophic failure" (Err.Number = -2147418113)

I have looked for the RessourcePath and file requested, all exist.

For the moment here is my "workaround"

        .LabelEdit = 1
on error resume next
        .Images.Add 1, "", LoadPicture(ResourcePath + "FolderClosed.gif")
        .Images.Add 2, "", LoadPicture(ResourcePath + "FolderOpen.gif")
        .Images.Add 3, "", LoadPicture(ResourcePath + "Leaf.gif")
        .Images.Add 4, "", LoadPicture(ResourcePath + "Iba_comp_prod.gif")
on error goto 0
        .Nodes.Clear

Have anyone ever had this problem ? How can I solve it ?

Some other trees (don't remember which though) load without problem and the FolderClosedand FolderOpenimages are displayed....

Thanks and Regards,

François