Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 6 - Dialog Manager / Dialog Manager Reference
Resources


The Alert Color Table Resource

On color monitors, the Dialog Manager automatically adds color to your alert boxes so that they match the colors of the windows and alerts used by system software. When you create alert resources, your application's alert boxes use the system's default colors. Typically, this is all you need to do to provide color for your alert boxes. (However, to include a color version of an icon in an alert box, you must add a resource of type 'cicn' with the same resource ID as the black-and-white 'ICON' resource specified in the item list resource.)

If you feel absolutely compelled to use nonstandard colors, you can use the Dialog Manager to specify colors other than the default colors. Your application can specify its own colors for an alert box by creating an alert color table ('actb') resource with the same resource ID as the alert resource (described beginning on page 6-142). You don't have to call any new routines to change the colors used in alert or dialog boxes. When you call the Alert function, for example, the Dialog Manager automatically attempts to load an alert color table resource with the same resource ID as the alert resource.

Be aware, however, that nonstandard colors in your alert boxes may initially confuse your users. Also be aware that despite any changes you may make, users can alter the colors of dialog boxes anyway by changing settings in the Color control panel.

WARNING
Because the behavior of color alert and dialog boxes, color items, and color icons is unreliable on computers using system software versions earlier than System 7, do not create these color elements if you wish to maintain backward compatibility.
An alert color table resource has exactly the same format as a window color table ('wctb') resource, which is described in the chapter "Window Manager" of this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996