Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to bind a Treeview.ImageList and an ImageList object

Status
Not open for further replies.

lhoudusse

Programmer
Jun 21, 2002
4
FR
Hi!

I want to bind a Treeview.ImageList and an ImageList object on client.

in VB : set Treeview1.ImageList=ImageList1 is good
but in VBScript I have a message "Invalid Object"

see my code:

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>

<HTML>

<BODY>
<OBJECT id=ImageList1 classid=clsid:2C247F23-8591-11D1-B16A-00C0F0283628 VIEWASTEXT>
<PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;1005&quot;>
<PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;1005&quot;>
<PARAM NAME=&quot;BackColor&quot; VALUE=&quot;-2147483643&quot;>
<PARAM NAME=&quot;ImageWidth&quot; VALUE=&quot;16&quot;>
<PARAM NAME=&quot;ImageHeight&quot; VALUE=&quot;13&quot;>
<PARAM NAME=&quot;MaskColor&quot; VALUE=&quot;12632256&quot;>
<PARAM NAME=&quot;UseMaskColor&quot; VALUE=&quot;-1&quot;>
<PARAM NAME=&quot;_Version&quot; VALUE=&quot;393216&quot;></OBJECT>
<OBJECT id=TreeView1 style=&quot;LEFT: 0px; TOP: 0px&quot; height=400 width=300 classid=&quot;CLSID:0713E8A2-850A-101B-AFC0-4210102A8DA7&quot; VIEWASTEXT>
<PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;7938&quot;>
<PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;10583&quot;>
<PARAM NAME=&quot;_Version&quot; VALUE=&quot;327682&quot;>
<PARAM NAME=&quot;HideSelection&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;Indentation&quot; VALUE=&quot;529&quot;>
<PARAM NAME=&quot;LabelEdit&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;LineStyle&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;PathSeparator&quot; VALUE=&quot;\&quot;>
<PARAM NAME=&quot;Sorted&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Style&quot; VALUE=&quot;7&quot;>
<PARAM NAME=&quot;ImageList&quot; VALUE=&quot;&quot;>
<PARAM NAME=&quot;BorderStyle&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Appearance&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;MousePointer&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;Enabled&quot; VALUE=&quot;1&quot;>
<PARAM NAME=&quot;OLEDragMode&quot; VALUE=&quot;0&quot;>
<PARAM NAME=&quot;OLEDropMode&quot; VALUE=&quot;0&quot;></OBJECT>

<SCRIPT LANGUAGE=&quot;VBScript&quot;>
ImageList1.Enabled=True
set TreeView1.ImageList = ImageList1
TreeView1.Font.Name = &quot;Arial&quot;
TreeView1.Font.Size = 7
</SCRIPT>
</BODY>
</HTML>

If I comment &quot;set TreeView1.ImageList = ImageList1&quot; I don't have an error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top