IHTMLStyleSheetRulesCollection

IHTMLStyleSheetRulesCollection


This interface provides the abilities to obtain the number of styleSheets in the collection, and access a single styleSheet element from the collection.

A collection of the rules in a styleSheet element. This is returned from the style sheets rules property.

IHTMLStyleSheetRulesCollection Methods
get_length   item  

IHTMLStyleSheetRulesCollection::get_length

HRESULT get_length( 
    long *p 
);

Returns the number of elements in a collection. This method provides the same capabilities as the length property.

p
Address of a value that receives the number of elements in the collection. This is an integer value or a string specifying the index value of the style sheet to retrieve. Integer indexes are zero-based, meaning the first style sheet in the collection has index 0.

IHTMLStyleSheetRulesCollection::item

HRESULT item(
    long index,
    IHTMLStyleSheetRule **ppHTMLStyleSheetRule 
);

Retrieves an element or a collection from the given collection. The index parameter determines which action to take.

index
Value that contains the number specifying the position of an element to retrieve.
ppHTMLStyleSheetRule
Address of a pointer to the IHTMLStyleSheetRule interface of the styleSheets element.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.