SetThemeBackground
To set the background grafport color to appearance savy color and pattern, use the SetThemeBackground function.
FUNCTION SetThemeBackground(ThemeBrush as Integer,inDepth as Integer,isColorDevice as Integer) as Integer
ThemeBrush:
A value representing the pattern
or color to which the background
is to be set. (See Brush
constants bellow)
inDepth:
The bit depth (in pixels) of the
current graphics port.
inIsColorDevice:
A Boolean value. Set to true to
indicate that you are drawing on
a color device. Set to false for
a monochrome device. function result
A result code.
Returns:
A result code, see result codes.
Description:
The SetThemeBackground function should be called each time you wish to draw an element in a speciÞed brush constant using Appearance Manager draw functions. The constant in the inBrush parameter can represent a color or pattern, depending on the current theme. Because it could specify a pattern, remember to save and restore the pnPixPat and bkPixPat Þelds of your graphics port when saving the text and background colors. Because patterns in the bkPixPat field override the background color of the window, call the Window Manager function BackPat to set your background pattern to a normal white pattern. This will ensure that you can use RGBBackColor to set your background color to white, call the Window Manager function EraseRect, and get the expected results.
Brush types:
1 - An active dialog boxÕs background
color or pattern.
2 - An inactive dialog boxÕs background
color or pattern.
3 - An active alert boxÕs background
color or pattern.
4 - An inactive alert boxÕs background
color or pattern.
5 - An active modeless dialog boxÕs
background color or pattern.
6 - An inactive modeless dialog boxÕs
background color or pattern.
7 - An active utility windowÕs background
color or pattern.
8 - An inactive utility windowÕs background
color or pattern.
9 - The background color or pattern of the
column upon which a list view is sorted.
10 - The background color or pattern of a
list view column that is not being
sorted upon.
11 - An icon labelÕs color or pattern.
12 - A list view separatorÕs color or
pattern.
13 - Asynchronous arrowsÕ color or pattern.
14 - The background color or pattern of an
element responding to a drag and drop,
indicating that the element is a valid
recipient.
15 - A document windowÕs background color or
pattern.
16 - A Finder windowÕs background color or
pattern. Generally, you should not use
this constant unless you are trying to
create a window that matches the Finder
window.
Supported platforms:
* MacOS PPC
* MacOS 68k
* MacOS Carbon
Unsupported platforms:
* Windows x86