Export (0) Print
Expand All

scrollbarHighlightColor property

Specifies the color of the slider tray, and the top and left edges of the scroll box and scroll arrows of a scroll bar.

Internet Explorer 9

 

Syntax

HRESULT value = object.put_scrollbarHighlightColor( v);HRESULT value = object.get_scrollbarHighlightColor(* p);

Property values

Type: VARIANT

Any color name or RGB values in the Color Table.

String format

variant

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Valuedepends on user-agent

Standards information

There are no standards that apply here.

Remarks

Windows Internet Explorer 8. The -ms-scrollbar-highlight-color attribute is an extension to CSS, and can be used as a synonym for IHTMLCurrentStyle2::scrollbarHighlightColor in IE8 Standards mode.

The scroll box is the square box within a scroll bar that can be moved either up and down or left and right on a track to change the position of the content on the screen. The scroll arrows, located at each end of a scroll bar, are the square buttons containing the arrows that move the content on the screen in small increments, either up and down or left and right.

This property applies to elements that display a scroll bar. Cascading Style Sheets (CSS) enable scrolling on all objects through the IHTMLRuleStyle::overflow property. These objects are not listed in the Applies To list for this property.

Examples

This example uses IHTMLCurrentStyle2::scrollbarHighlightColor, IHTMLCurrentStyle2::scrollbarFaceColor, and IHTMLCurrentStyle2::scrollbarArrowColor to create two div objects with different scroll bar color schemes.


div {
  width: 150px;
  height: 150px;
  border-style: solid;
  border-width: thin;
  overflow-y: scroll;
  font-family: sans-serif;
  float: left;
  margin-right: 10px;
}
.blueScroll {
  scrollbar-highlight-color: aqua;
  scrollbar-face-color: blue;
  scrollbar-arrow-color: blue;
  border-color: blue;
}
.redScroll {
  scrollbar-highlight-color: bisque;
  scrollbar-face-color: red;
  scrollbar-arrow-color: red;
  border-color: red;
}


<body>
  <div class="blueScroll">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
  <div class="redScroll">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
  </div>
</body>

The following image shows the result:

An image showing two div objects with different scroll bar color schemes.

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

See also

Reference
IHTMLCurrentStyle2::scrollbar3dLightColor
IHTMLCurrentStyle2::scrollbarArrowColor
IHTMLCurrentStyle2::scrollbarBaseColor
IHTMLCurrentStyle2::scrollbarDarkShadowColor
IHTMLCurrentStyle2::scrollbarFaceColor
IHTMLCurrentStyle2::scrollbarShadowColor
IHTMLCurrentStyle2::scrollbarTrackColor

 

 

Community Additions

ADD
Show:
© 2014 Microsoft