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


HideControl

To make a control invisible, before adjusting its size and location, for example, use the HideControl procedure.

PROCEDURE HideControl (theControl: ControlHandle);
theControl
A handle to the control you want to hide.
DESCRIPTION
The HideControl procedure makes the specified control invisible by changing the value of the contrlVis field of the control record and removing the control from the screen. To fill the region previously occupied by the control, HideControl uses the background pattern of the window's graphics port. It also adds the control's rectangle to the window's update region, so that anything else that was previously obscured by the control will reappear on the screen. If the control is already invisible, HideControl has no effect.

To make the control visible again, you can use the ShowControl procedure.

SPECIAL CONSIDERATIONS
The MoveControl and SizeControl procedures both call HideControl and ShowControl automatically. However, so that the control will not blink on the screen when you make both of these calls, you should use HideControl to make the control invisible until you are finished manipulating it, and then use ShowControl.

SEE ALSO
Listing 5-14 on page 5-36 illustrates the use of HideControl before adjusting scroll bar settings and locations.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996