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: More Macintosh Toolbox /
Chapter 5 - Icon Utilities / Icon Utilities Reference
Icon Utilities Routines / Getting and Setting the Label for an Icon Suite


SetSuiteLabel

You can use the SetSuiteLabel function to specify the default label associated with an icon suite.

FUNCTION SetSuiteLabel (theSuite: Handle; 
                        theLabel: Integer): OSErr;
theSuite
A handle to an icon suite.
theLabel
An integer from 1 to 7 that specifies a label for the icon suite, or 0 to set the icon suite's label to none.
DESCRIPTION
The SetSuiteLabel function sets the label associated with the specified icon suite. The default label setting helps to determine which of the label colors shown in the Finder's Label menu is applied to icons of that suite when your application displays them.

You can override the default label setting for a suite by specifying a label in the transform parameter of the PlotIconSuite function. For example, suppose the color currently set for the third label displayed in the Finder's Label menu is red, and the color for the fourth label is green. If you set the default label for a suite using SetSuiteLabel(theSuite,3), then draw an icon from the same suite using PlotIconSuite and specifying ttNone in the transform parameter, the label color red is applied to the icon. However, if you specify ttLabel4 in the transform parameter of the PlotIconSuite function, the label color green is applied to the icon.

RESULT CODES
noErr0No error
paramErr-50The theLabel parameter is greater than 7
SEE ALSO
For a description of the PlotIconSuite function, see page 5-35.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996