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


SizeControl

To change the size of a control's rectangle, use the SizeControl procedure.

PROCEDURE SizeControl (theControl: ControlHandle; 
                       h: Integer; v: Integer);
theControl
A handle to the control you wish to resize.
w
The new width, in pixels, of the resized control.
h
The new height, in pixels, of the resized control.
DESCRIPTION
The SizeControl procedure changes the rectangle specified in the contrlRect field of the control's control record. The lower-right corner of the rectangle is adjusted so
that it has the width and height specified by the w and h parameters; the position of the upper-left corner is not changed. If the control is currently visible, it's first hidden and then redrawn in its new size. The SizeControl procedure uses HideControl, which changes the window's update region.

SEE ALSO
Listing 5-24 on page 5-61 illustrates the use of SizeControl to change the size of a scroll bar.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996