DHTML Lab: Accessing the User-Defined System Colors, Part I - dhtmlab.com | 22 | WebReference

DHTML Lab: Accessing the User-Defined System Colors, Part I - dhtmlab.com | 22


Accessing the User-Defined System Colors, Part I

The background color of all windowed elements (within OS windows) is set with the Window option under Item:
Windowed elements in a browser application, for example, includes form elements and the main page rendering area.

If you set the background color of your page in HTML, then only form elements will be displayed with this color.

We would have cause to use this value in DHTML only if we were to create a "fake" window for some reason. Since the browsers create form elements using OS controls, they are already shaded correctly.

We do not know how this value is set by a user, but we assume it is set when a window background color is selected, above. In all the built-in Windows desktop schemes, it defaults to black.

It can be set programmatically, however, by an application.

This value colors the single pixel frame that surrounds a windowed element. Not all applications use it. Explorer doesn't, for example. Navigator, on the other hand uses it to alert the user to the "frame in focus" in a frameset document. See the screenshots above and to the left.
There is very little use for this value in DHTML.

The text color of a windowed element is set by first selecting the Window option under Item:, then specifying a color under Font:
All text entered by the user, or alerting the user in a dialog, is affected by this value, since text is always displayed in a windowed element.
This is a very important value, and one of the most popular custom settings of users. It is the color users want their displayed text to appear in. DHTML elements, like popup dialogs, should always use this value for a true application look.

Don't worry, we're getting to the important stuff on the next page...

Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: Feb 23, 1999
Revised: Feb 23, 1999

URL: http://www.webreference.com/dhtml/column24/colsIEwindow.html