Carbon


SizeControl

Header: Controls.h Carbon status: Supported

Changes the size of a control’s rectangle.

void SizeControl (
    ControlRef theControl, 
    SInt16 w, 
    SInt16 h
);
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.

DISCUSSION

The SizeControl function changes the rectangle specified in the contrlRect field of the control structure. 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 function will change the window’s update region.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)