HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Posted by: Andrei (
Date: Thursday, 18-Jun-2009, 18:14:35

please help a beginner with this.
i want to use this code for accessing an html page stylesheet rules:
Dim ss As onlyconnect.IHTMLStyleSheet
Dim ssCol As onlyconnect.IHTMLStyleSheetsCollection
Dim ssR As onlyconnect.IHTMLStyleSheetRule
ssCol = HtmlEditor1.HtmlDocument2.GetStyleSheets
ss = ssCol.item(0) -- one style on the page, here it gives me a null error in vb express
Dim a As Integer
For a = 0 To 15 ' I have 16 rules on a test page
ssR = ss.GetRules.Item(a)
Next a
the item function accept for index a pvarIndex type variable I know, but how to I use an integer for index.
again please help a poor beginner.
thank you

Re: styleshhetcollection
Posted by: Prabhath Pallati (
Date: Thursday, 25-Jun-2009, 14:25:17

I was also facing the same problem till now but I found a solution to this.

In IHTMLStyleSheetsCollection interface under comsupport.cs contains the following declaration for IHTMLStyleSheetsCollection.item function:

object item([In] object pvarIndex);

instead there should be the following declaration:

object item([In] ref object pvarIndex);

which will solve the problem.

Your Name: 
Your Email: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.