This topic has not yet been rated - Rate this topic

clip property

Sets or retrieves which part of a positioned object is visible.

Syntax

Integer value = object.put_clip( v);Integer value = object.get_clip(* sClip);

Property values

Type: BSTR

auto (auto)

Default. Clip to expose entire object.

rect(top, right, bottom, left) (rect(top, right, bottom, left))

Top, right, bottom, and left specify length values, any of which can be replaced by auto, leaving that side not clipped. The value of top specifies that everything above this value on the Y axis (with 0 at the top) is clipped. The value of right specifies that everything above this value on the X axis (with 0 at the left) is clipped. The value of bottom specifies that everything below this value on the Y axis (with 0 at the top) is clipped. The value of left specifies that everything to the left of this value on the X axis (with 0 at the left) is clipped.

String format

auto | rect(top, right, bottom, left)

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Remarks

As of Windows Internet Explorer 8, the required syntax of the IHTMLStyle::clip attribute is identical to that specified in the Cascading Style Sheets, Level 2 Revision 1 (CSS2.1) specification; that is, commas are now required between the parameters of the rect() value. This behavior requires Windows Internet Explorer to be in IE8 Standards mode (or EmulateIE8 mode with an Internet Explorer 8 !DOCTYPE directive). For more information on document compatibility modes, see Defining Document Compatibility.

In Windows Internet Explorer 7 and earlier (and in Internet Explorer 8 or later in IE7 Standards mode, EmulateIE7 mode, or IE5 (Quirks) mode), the commas should be omitted. For example: IHTMLStyle::clip:rect(0 50 50 0)

The required syntax of the IHTMLStyle::clip attribute is identical to that specified in the CSS2.1 specification; that is, commas are now required between the parameters of the rect() value.

This property defines the shape and size of the positioned object that is visible. The IHTMLStyle::position must be set to absolute. Any part of the object that is outside the clipping region is transparent. Any coordinate can be replaced by the value auto, which exposes the respective side (that is, the side is not clipped).

The order of the values IHTMLStyle::clip:rect(0, 0, 50, 50) renders the object invisible because it sets the top and right positions of the clipping region to 0. To achieve a 50-by-50 view port, use IHTMLStyle::clip:rect(0, 50, 50, 0).

The IHTMLStyle::clip attribute and the IHTMLStyle::clip property are available on the Macintosh platform, as of Microsoft Internet Explorer 5.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference
IHTMLCurrentStyle::clipBottom
IHTMLCurrentStyle::clipLeft
IHTMLCurrentStyle::clipRight
IHTMLCurrentStyle::clipTop

 

 

Build date: 11/12/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.