Solved

Treeview and Imagelist using vbscript...?

Posted on 1998-09-07
4
663 Views
Last Modified: 2012-05-04
Hello,

I'm having trouble getting a treeview control to accept an image from an imagelist.  The treeview is working fine with manuel adding parent and children nodes.  But as soon as I add the following:

Set TreeForm.Tree.ImageList = ImageList1
TreeForm.Tree.Nodes.Add , , "Mgt", "Management", 1

Inetdev will crash.  I have also tried it with IE4, and it also will crash.  I assume there is something different I need to do to set the imagelist for access.

NOTE: OS is NT4 workstation and Inetdev 1.0
0
Comment
Question by:westbergk
4 Comments
 

Accepted Solution

by:
javaman17 earned 100 total points
Comment Utility
<HTML>
<body bgColor='white'>


<center>

<h3>This site runs JavaScript&#174;. </h3>


<p>
<br>
<br>
You should not stop your browser while loading this page,
a tree structure will be built in this left frame in a few seconds. <br>
(If not, click <a href="compatibility.htm">here</a>.)
<br><br><br><br>
<br>
<font size=-1>Loading auxiliary bitmaps:<br>
<img src='closedfolder.gif'><img src='openfolder.gif'><img src='node.gif'>
<img src='lastnode.gif'><img src='vertline.gif'>
<img src='blank.gif'><img src='doc.gif'><img src='link.gif'>
<br>

</center>
</HTML>


0
 
LVL 1

Author Comment

by:westbergk
Comment Utility
Javaman17,

I see that the <img src='pic.gif'> could retrieve the image from the server, but how would it be placed in the imagelist so that the treeview could use it...
0
 
LVL 2

Expert Comment

by:orbitaltech
Comment Utility
what the hell is that, Javaman17???

That has nothing to do with VBScript and the Imagelist control.. Get your head on straight.. I don't know why he gave you the points... Moron


0
 
Comment Utility
So now we all know how to use the <img> tag. Now how about answering the ruddy question Javaman17? The nearest I have come is the sample on MSDN Q165674. But this fails when you try to get the Picture property of the picture control with an invalid property error.
ie. Set imgX = ImageList1.ListImages.Add(1,"open",Image1.picture) The only way that will work is: ImageList1.ListImages.Add 1,"open",LoadPicture("\\Myshare\folderopen.gif")
But this is only good on an intranet with a shared folder.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now