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 set an object as property of another object

Status
Not open for further replies.

lhoudusse

Programmer
Jun 21, 2002
4
FR
Hi!

I want to bind an ImageList and a Treeview
I know that the property Treeview.ImageList accept an ImageList type object.
But
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
TreeView1.Font.Name = &quot;Arial&quot;;
TreeView1.Font.Size = 7;
TreeView1.ImageList=ImageList1;
</SCRIPT>

didn't work,see the message: &quot;invalid object&quot;

If I comment the row &quot;TreeView1.ImageList=ImageList1;&quot; it work good

 
I don't think this is javascript.
I don't know about ImageList in javascript.

Probably it's java or Visual basic or something (I'm not familiar with that :-()

Erik
<!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
ImageList1 and Treview1 are ActiveX components

see code:

<HTML>
<BODY>
<OBJECT id=ImageList1 classid=clsid:58DA8D8F-9D6A-101B-AFC0-4210102A8DA7 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;0&quot;>
<PARAM NAME=&quot;ImageHeight&quot; VALUE=&quot;0&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;327682&quot;>
</OBJECT>
<OBJECT id=TreeView1 style=&quot;LEFT: 0px; TOP: 0px&quot; height=400 width=300 classid=CLSID:0713E8A2-850A-101B-AFC0-4210102A8DA7 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;JavaScript&quot;>
TreeView1.Font.Name = &quot;Arial&quot;;
TreeView1.Font.Size = 7;
TreeView1.ImageList=ImageList1;
</SCRIPT>

</HTML>
</BODY>
 
I recommend the Internet Explorer forum then. ActiveX components are not JavaScript.

I recommend using components thare opened to standards. ActiveX is not open to anything except IE and you see how nicely it works. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top