This topic has not yet been rated - Rate this topic

IHTMLSelectionObject interface

This interface provides the access methods for the selection object that represents the active selection, a highlighted block of text, or other elements in the document upon which a user or a script can carry out some action.

Members

The IHTMLSelectionObject interface inherits from the IDispatch interface but does not have additional members.

Remarks

You can use the selection object as input from the user that identifies on what portion of the document to act, or as output to the user showing the results of an action.

Users and scripts can both create selections. Users create selections by dragging the mouse pointer over a portion of the document. Scripts create selections by calling the IHTMLTxtRange::select method on a text range or similar object. You can retrieve the active selection by applying the selection keyword to the document object. You can create a text range object from the selection by using the IHTMLSelectionObject::createRange method.

A document can have only one selection at a time. The selection has a type that determines whether it is empty or contains a contiguous block of consecutive text or elements. Although an empty selection contains nothing, it is useful for marking a position in the document.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

 

 

Build date: 11/12/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.