textOverflow property
Specifies a value that indicates whether to render ellipses (...) to indicate text overflow.
Syntax
HRESULT value = object.put_textOverflow( v);HRESULT value = object.get_textOverflow(* p);
Property values
Type: BSTR
A value that indicates whether ellipses (...) display when text content has overflowed its given layout area.
ellipsis (ellipsis)
Display ellipses (...) for text overflow.
clip (clip)
Default. Simply clip the content and do not display ellipses for text overflow.
String format
ellipsis | clip
CSS information
Applies To | All elements |
Media | visual |
Inherited | no |
Initial Value | clip |
Remarks
Windows Internet Explorer 8. The IHTMLStyle4::textOverflow attribute is an extension to CSS, and can be used as a synonym for text-overflow in IE8 Standards mode.
The IHTMLStyle4::textOverflow property was introduced in Microsoft Internet Explorer 6
This property only applies to text overflow in the inline direction (horizontal, in normal Western text). Inline overflow occurs when the text in a line overflows the available width without a breaking opportunity. To force overflow to occur and ellipses to be applied, the author must apply the nowrap value to the IHTMLStyle::whiteSpace property on the element, or wrap the content in a <nobr>
tag. If there is no breaking opportunity (for example, the width is narrow or there is a long word that does not break well), then overflow may occur without nowrap being applied.
This property on the element must be set to something other than visible, the default, in order for ellipses to be rendered. The best choice is to set IHTMLRuleStyle::overflow to hidden. Setting IHTMLRuleStyle::overflow to scroll or auto will also work, but will show scrollbars.
The hidden text can be selected by selecting the ellipses. When selected, the ellipses will disappear and be replaced by the text to the extent of the layout area.
This property offers an efficient alternative to building ellipses in Dynamic HTML (DHTML). As ellipses may be rendered many times on a single page, using this property can significantly speed up performance.
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Header |
Mshtml.h |
IDL |
Mshtml.idl |
DLL |
Mshtml.dll |