TreeView Control and ImageList 
Author Message
 TreeView Control and ImageList

I have some code that I am trying to use to display a tree view of our data.
I have include the code below. There are two problems.
1) The line 'Set NRCSTreeView.ImageList = imlImages' does not work. This
should be an ImageList object. I have checked the classid and Visual
Interdev seems to think that it is an ImageList. I can set properties as if
it was am ImageList, etc. But when I try to assign this list of images to
the TreeView control I get an error 'Error: Invalid object'. Has anyone else
had success assigning an image list to a TreeView control?
2) I can't find a persistent way of locating the bitmaps (BMP files) for the
image list (ImageList control). If I do what I have done every client that
accesses the server script needs to have the BMP files in a set location.
How can I persist the BMP files on the server so that I dont' have to keep
them on every client.

Thank you.

Kevin Burton

  <P>
  <STRONG>
  <OBJECT classid="clsid:2C247F23-8591-11D1-B16A-00C0F0283628" id=imlImages
....
 </STRONG>
  </P>
  <P>
  <OBJECT classid="clsid:0713E8A2-850A-101B-AFC0-4210102A8DA7"
id=NRCSTreeView ...
  </P>
  <SCRIPT LANGUAGE=VBScript>
  <!--
    Dim imgI
    Dim imagePath

    imagePath = "D:\Local\"

    Set imgI = imlImages.ListImages.Add (, "Closed Directory", LoadPicture
(imagePath & "images\closeddir.bmp") )
    Set imgI = imlImages.ListImages.Add (, "Open Directory", LoadPicture
(imagePath & "images\opendir.bmp") )
    Set imgI = imlImages.ListImages.Add (, "Closed Queue", LoadPicture
(imagePath & "images\closedqueue.bmp") )
    Set imgI = imlImages.ListImages.Add (, "Open Queue", LoadPicture
(imagePath & "images\openqueue.bmp") )
    Set imgI = imlImages.ListImages.Add (, "Story", LoadPicture (imagePath &
"images\script.bmp") )
    Set NRCSTreeView.ImageList = imlImages

    Set rootTreeNode = NRCSTreeView.Nodes.Add(, , "<%= rootID %>", "<%=
description %>", "Closed Directory")

  //-->



Tue, 04 Feb 2003 03:00:00 GMT  
 TreeView Control and ImageList


Quote:
>1) The line 'Set NRCSTreeView.ImageList = imlImages' does not work.
>2) I can't find a persistent way of locating the bitmaps (BMP files)

Hi Kevin

I can't say for sure whether this will solve your problems, but try my TreeView
subclass, VFPTree. It's a VB TreeView subclass, created to overcome some
problems with earlier versions of Visual FoxPro, but you can still use it in
your ASP envorinment just fine. You can download it at my website:

  http://www.jeffbowman.com/

A handy feature of VFPTree is that a separate ImageList control isn't needed.

I haven't tried the second issue you're struggling with, so I can't offer an
opinion there. Maybe this will work -- it's worth a shot. [did you try
LoadPicture()?]

HTH,
Jeff

p.s. VFPTree is Public Domain.

+-------------------------------------------------------+
   mailto:jbowman jeffbowman com
+-------------------------------------------------------+



Thu, 06 Feb 2003 14:30:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. TreeView Control and ImageList does not work

2. Using TreeView and ImageList Controls

3. TreeView, Tab and ImageList controls

4. TreeView, Tab and ImageList Active-X controls

5. Overlay 2 icons in ImageList control to assign to Treeview control node image

6. imagelist / treeview control on web page, bug ie6?

7. TreeView/ImageList control error

8. TreeView & ImageList

9. Help with Treeview & Imagelist

10. Treeview & Imagelist question

11. TreeView and ImageList

12. Imagelist + treeview..

 

 
Powered by phpBB® Forum Software