IHTMLStyle::put_paddingLeft
IHTMLStyle

IHTMLStyle::put_paddingLeft


HRESULT put_paddingLeft( 
    VARIANT v 
);

Sets the value of the CSS padding-left attribute for the element. The attribute determines the amount of space between the border and the left of the element's content.

v
String or value specifying the amount of left padding. See padding-left for details. Set this parameter to NULL to remove the attribute.

See also get_paddingLeft

IHTMLStyle::put_paddingRight

HRESULT put_paddingRight(
    VARIANT v 
);

Sets the value of the CSS padding-right attribute for the element. The attribute determines the amount of space between the border and the right of the element's content.

v
String or value specifying the amount of right padding. See padding-right for details. Set this parameter to NULL to remove the attribute.

See also get_paddingRight

IHTMLStyle::put_paddingTop

HRESULT put_paddingTop(
    VARIANT v 
);

Sets the value of the CSS padding-top attribute for the element. The attribute determines the amount of space between the border and the top of the element's content.

v
String or value specifying the amount of top padding. See padding-top for details. Set this parameter to NULL to remove the attribute.

See also get_paddingTop

IHTMLStyle::put_pageBreakAfter

HRESULT put_pageBreakAfter(
    BSTR v 
);

Sets the value of the CSS page-break-after attribute for the element. The attribute determines whether a page break occurs after the element and on what page the subsequent content should resume.

v
String specifying the value of the attribute. Can be one of these strings:
auto Insert a page break after the element only if necessary.
always Always insert a page break after the element.
left Insert one or two page breaks after the element until a blank left page is reached.
right Insert one or two page breaks after the element until a blank right page is reached.
See page-break-after for details.

See also get_pageBreakAfter

IHTMLStyle::put_pageBreakBefore

HRESULT put_pageBreakBefore(
    BSTR v 
);

Sets the value of the CSS page-break-before attribute for the element. The attribute determines whether a page break occurs before the element, and on what page the subsequent content should resume.

v
String specifying the value of the attribute. Can be one of these strings:
auto Insert a page break before the element only if necessary.
always Always insert a page break before the element.
left Insert one or two page breaks before the element until a blank left page is reached.
right Insert one or two page breaks before the element until a blank right page is reached.
See page-break-before for details.

See also get_pageBreakBefore

IHTMLStyle::put_pixelHeight

HRESULT put_pixelHeight( 
    long v 
);

Sets the height of the element, in pixels.

v
Long integer value specifying the height. Setting this property changes the height without changing the units designator.

Unlike the height attribute, this attribute's value is an integer, not a string, and is always interpreted in pixels.

See also get_pixelHeight

IHTMLStyle::put_pixelLeft

HRESULT put_pixelLeft( 
    long v 
);

Sets the left position of the element, in pixels.

v
Long integer value specifying the left position. Setting this property changes the value of the left position without changing the units designator.

Unlike the left attribute, this attribute's value is an integer, not a string, and is always interpreted in pixels.

See also get_pixelLeft

IHTMLStyle::put_pixelTop

HRESULT put_pixelTop(
    long v 
);

Sets the top position of the element, in pixels.

v
Long integer value specifying the top position. Setting this property changes the value of the top position without changing the units designator.

Unlike the top attribute, this attribute's value is an integer, not a string, and is always interpreted in pixels.

See also get_pixelTop

IHTMLStyle::put_pixelWidth

HRESULT put_pixelWidth(
    long v 
);

Sets the width of the element, in pixels.

v
Long integer value specifying the width. Setting this property changes the width without changing the units designator.

Unlike the width attribute, this attribute's value is an integer, not a string, and is always interpreted in pixels.

See also get_pixelWidth

IHTMLStyle::put_posHeight

HRESULT put_posHeight( 
    float v 
);

Sets the height of the element.

v
Floating-point value specifying the height of the element.

Setting this property changes the value of the height but leaves the units designator for the property unchanged.

Unlike the height property, this property's value is a floating-point number, not a string.

See also get_posHeight

IHTMLStyle::put_posLeft

HRESULT put_posLeft(
    float v 
);

Sets the left position of the element.

v
Floating-point value specifying the left position.

Setting this property changes the value of the left position but leaves the units designator for the property unchanged.

Unlike the left property, this property's value is a floating-point number, not a string.

See also get_posLeft

IHTMLStyle::put_posTop

HRESULT put_posTop(
    float v 
);

Sets the top position of the element.

v
Floating-point value specifying the top position.

Setting this property changes the value of the top position but leaves the units designator for the property unchanged.

Unlike the top property, this property's value is a floating-point number, not a string.

See also get_posTop

IHTMLStyle::put_posWidth

HRESULT put_posWidth(
    float v 
);

Sets the width of the element.

v
Floating-point value specifying the width of the element.

Setting this property changes the value of the width but leaves the units designator for the property unchanged.

Unlike the width property, this property's value is a floating-point number, not a string.

See also get_posWidth

IHTMLStyle::put_styleFloat

HRESULT put_styleFloat( 
    BSTR v 
);

Sets the value of the CSS float attribute for the element. The attribute determines whether the element floats, causing text to flow around it.

v
String specifying the value of the attribute. Can be one of these strings:
left
right
none
See float for details. Set this parameter to NULL to remove the attribute.

See also get_styleFloat

IHTMLStyle::put_textAlign

HRESULT put_textAlign(
    BSTR v 
);

Sets the value of the CSS text-align attribute for the element. The attribute determines the alignment of the element's text.

v
String specifying the text alignment, or NULL to remove the attribute. Can be one of these strings:
left
right
center
justify
See text-align for details.

See also get_textAlign

IHTMLStyle::put_textDecoration

HRESULT put_textDecoration(
    BSTR v 
);

Sets the value of the CSS text-decoration attribute for the element.

v
String or value specifying the text decorations. Can be "none" or one of the following strings:
underline
overline
line-through
See text-decoration for details. Set this parameter to NULL to remove the attribute.

See also get_textDecoration

IHTMLStyle::put_textDecorationBlink

HRESULT put_textDecorationBlink(
    VARIANT_BOOL v 
);

Sets the value of the element's CSS text-decoration attribute to "blink", or removes the "blink" value from the attribute.

v
Boolean value. TRUE sets the attribute to "blink"; FALSE removes the "blink" value from the attribute. See text-decoration for details.

See also get_textDecorationBlink

IHTMLStyle::put_textDecorationLineThrough

HRESULT put_textDecorationLineThrough( 
    VARIANT_BOOL v 
);

Sets the value of the element's CSS text-decoration attribute to "line-through", or removes the "line-through" value from the attribute.

v
Boolean value. TRUE sets the attribute to "line-through"; FALSE removes the "line-through" value from the attribute. See text-decoration for details.

See also get_textDecorationLineThrough

IHTMLStyle::put_textDecorationNone

HRESULT put_textDecorationNone(
    VARIANT_BOOL v 
);

Sets the value of the element's CSS text-decoration attribute to "none", or removes the "none" value from the attribute.

v
Boolean value. TRUE sets the attribute to "none"; FALSE removes the "none" value from the attribute. See text-decoration for details.

See also get_textDecorationNone

IHTMLStyle::put_textDecorationOverline

HRESULT put_textDecorationOverline(
    VARIANT_BOOL v 
);

Sets the value of the element's CSS text-decoration attribute to "overline", or removes the "overline" value from the attribute.

v
Boolean value. TRUE sets the attribute to "overline"; FALSE removes the "overline" value from the attribute. See text-decoration for details.

See also get_textDecorationOverline

IHTMLStyle::put_textDecorationUnderline

HRESULT put_textDecorationUnderline(
    VARIANT_BOOL v 
);

Sets the value of the element's CSS text-decoration attribute to "underline", or removes the "underline" value from the attribute.

v
Boolean value. TRUE sets the attribute to "underline"; FALSE removes the "underline" value from the attribute. See text-decoration for details.

See also get_textDecorationUnderline

IHTMLStyle::put_textIndent

HRESULT put_textIndent( 
    VARIANT v 
);

Sets the value of the CSS text-indent attribute for the element. The attribute determines the amount of indention before the element's first line of formatted text.

v
String or value specifying the amount of indention, or NULL to remove the attribute. The amount can be positive or negative. See text-indent for details.

See also get_textIndent

IHTMLStyle::put_textTransform

HRESULT put_textTransform(
    BSTR v 
);

Sets the value of the CSS text-transform attribute for the element.

v
String specifying the text transformation, or NULL to remove the attribute. Can be one of these strings:
capitalize First letter in the text is capitalized.
lowercase All letters in the text are converted to lowercase.
uppercase All letters in the text are converted to uppercase.
See text-transform for details.

See also get_textTransform

IHTMLStyle::put_top

HRESULT put_top(
    VARIANT v 
);

Sets the value of the CSS top attribute for the element. The attribute determines the top position of the element.

v
String or value consisting of a floating-point number and a units designator. See top for details. Set this parameter to NULL to remove the attribute.

See also get_top

IHTMLStyle::put_verticalAlign

HRESULT put_verticalAlign(
    VARIANT v 
);

Sets the value of the CSS vertical-align attribute for the element. The attribute determines the vertical positioning of the element.

v
String or value specifying the vertical alignment. Can be a percentage (either positive or negative) of the line height of the element, or one of the values below. These values are relative to the parent element:
baseline
middle
sub
super
text-top
text-bottom
These values are relative to the formatted line of which the element is a part:
top
bottom
See vertical-align for details. Set this parameter to NULL to remove the attribute.

See also get_verticalAlign

IHTMLStyle::put_visibility

HRESULT put_visibility(
    BSTR v 
);

Sets the value of the CSS visibility attribute for the element. The attribute determines whether the content of the element is visible.

v
String specifying whether the element is visible. Can be one of these strings:
visible
hidden
inherit
See visibility for details. Set this parameter to NULL to remove the attribute.

Space is reserved for the element's content regardless of the value of the visibility attribute.

See also get_visibility

IHTMLStyle::put_whiteSpace

HRESULT put_whiteSpace(
    BSTR v 
);

Sets the CSS white-space attribute for the element. The attribute determines whether and how white-space characters in the element are displayed.

v
String specifying the value of the attribute. Can be one of these strings:
normal Consecutive white-space characters are replaced with a single space.
nowrap Linebreak characters are preserved, but consecutive spaces and tab characters are replaced with a single space.
pre All white-space characters (including line breaks) are preserved.
Set this parameter to NULL to remove the attribute.

See also get_whiteSpace

IHTMLStyle::put_width

HRESULT put_width(
   VARIANT v 
);

Sets the value of the CSS width attribute for the element. The attribute determines the element's width.

v
String specifying the width, which consists of a floating-point number and a units designator. See width for details. Set this parameter to NULL to remove the attribute.

See also get_width

IHTMLStyle::put_wordSpacing

HRESULT put_wordSpacing( 
    VARIANT v 
);

Sets the value of the CSS word-spacing attribute for the element. The attribute determines the amount of space to add to the default space between words in the element's text.

v
String or value specifying the amount of space to add. A negative value is valid. Set this parameter to NULL to remove the attribute.

See also get_wordSpacing

IHTMLStyle::put_zIndex

HRESULT put_zIndex(
    VARIANT v 
);

Sets the value of the CSS z-index attribute for the element. The attribute determines whether the element is positioned above or below the text.

v
String or value specifying the z-index. A positive value positions the element above the text, and a negative value positions it below. See z-index for details. Set this parameter to NULL to remove the attribute.

See also get_zIndex

IHTMLStyle::removeAttribute

HRESULT removeAttribute( 
    BSTR strAttributeName, 
    VARIANT_BOOL fCaseSensitive,
    VARIANT_BOOL *pfSuccess 
);

Removes the given attribute from the element.

strAttributeName
String specifying the name of the attribute to remove.
fCaseSensitive
Boolean value specifying whether to use a case-sensitive search to locate the attribute. If TRUE, the uppercase and lowercase letters in strAttributeName must match exactly those in the attribute name.
pfSuccess
Address of a variable that receives TRUE if the function succeeds, or FALSE otherwise.

If two or more attributes have the same name (differing only in uppercase and lowercase letters) and fCaseSensitive is false, this method removes only the last attribute (the last to be created with this name). All other attributes of the same name are ignored.

See also getAttribute, setAttribute

IHTMLStyle::setAttribute

HRESULT setAttribute( 
    BSTR strAttributeName,
    VARIANT AttributeValue,
    VARIANT_BOOL fCaseSensitive 
);

Sets the value of the given attribute. If the attribute is not already present, the method adds the attribute to the element and sets the value.

strAttributeName
String specifying the name of the attribute to set.
AttributeValue
String, number, or Boolean value to assign to the attribute.
fCaseSensitive
Boolean value specifying whether to use a case-sensitive search to locate the attribute. If TRUE, the uppercase and lowercase letters in strAttributeName must match exactly those in the attribute name.

Be careful when spelling attribute names. If fCaseSensitive is TRUE and strAttributeName does not have the same uppercase and lowercase letters as the attribute, this method creates a new attribute.

If two or more attributes have the same name (differing only in uppercase and lowercase letters) and fCaseSensitive is FALSE, this method assigns values only to the first attribute (the first to be created with this name). All other attributes of the same name are ignored.

See also getAttribute

IHTMLStyle::toString

HRESULT toString( 
   BSTR *String 
);

Retrieves a string representation of the style object.

String
Address of a variable that receives the string representation.

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