Important: The information in this document is obsolete and should not be used for new development.
PickColor
Displays the standard color picker dialog box.
pascal OSErr PickColor (ColorPickerInfo *theColorInfo);
theColorInfo
- A pointer to a color picker parameter block (page 2-20). On input, you specify information such as the location of the dialog box. On output, the parameter block specifies information such as whether the user has changed the color.
DISCUSSION
ThePickColor
function displays the standard, modal dialog box for color pickers. Use the color picker parameter block pointed to in the parametertheColorInfo
to specify information to and obtain information from the Color Picker Manager.When the user clicks the OK button, the
PickColor
function removes the dialog box and returnstrue
in thenewColorChosen
field of the color picker parameter block pointed to by thetheColorInfo
parameter. ThePickColor
function also returns the user's selected color in the fieldtheColor
. When the user clicks the Cancel button,PickColor
removes the dialog box and returnsfalse
in thenewColorChosen
field.SEE ALSO
Listing 2-1 in Advanced Color Imaging on the Mac OS illustrates how to use thePickColor
function. If your application needs to display color pickers in a dialog box other than the standard modal dialog box, your application must use the Color Picker Manager low-level functions, as described in "Using Customized Dialog Boxes for Color Pickers" (page 2-10) in Advanced Color Imaging on the Mac OS.