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 5 - Control Manager / Control Manager Reference
Control Manager Routines / Changing Control Settings and Display


HiliteControl

If you need to change the highlighting of a control, you can use the HiliteControl procedure.

PROCEDURE HiliteControl (theControl: ControlHandle; 
                         hiliteState: Integer);
theControl
A handle to the control.
hiliteState
A value from 0 through 255 to signify the highlighting of the control.
The value of 0 signifies no highlighting for the active control. A value from 1 through 253 signifies a part code designating the part of the (active) control to highlight. (Part codes are explained in the description of FindControl on page 5-82.) The value 255 signifies that the control is to be made inactive and drawn accordingly.
DESCRIPTION
The HiliteControl procedure calls the control definition function to redraw the control with the highlighting specified in the hiliteState parameter. The HiliteControl procedure uses the value in this parameter to change the value
of the contrlHilite field of the control's control record.

Except for scroll bars (which you should hide using the HideControl procedure), you should use HiliteControl to make all controls inactive when their windows are not frontmost. The TrackControl function automatically uses the HiliteControl procedure as appropriate; when you use TrackControl, you don't need to call HiliteControl.

SPECIAL CONSIDERATIONS
The value 254 should not be passed in the hiliteState parameter; this value is reserved for future use.

SEE ALSO
The chapter "Dialog Manager" in this book provides several examples of the use of HiliteControl.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996