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


SetControlMaximum

To change the maximum setting of a control and redraw its indicator or scroll
box accordingly, you can use the SetControlMaximum procedure. The SetControlMaximum procedure is also available as the SetCtlMax procedure.

PROCEDURE SetControlMaximum (theControl: ControlHandle; 
                             maxValue: Integer);
theControl
A handle to the control whose maximum setting you wish to change.
maxValue
The new maximum setting.
DESCRIPTION
The SetControlMaximum procedure changes the contrlMax field of the control record to the setting you specify in the maxValue parameter and redraws its indicator
or scroll box to reflect its new range.

When you create a control, you specify an initial maximum setting either in the control resource or in the max parameter of the NewControl function. To determine a control's current maximum setting, use the GetControlMaximum function.

When you set the maximum setting of a scroll bar equal to its minimum setting, the control definition function makes the scroll bar inactive; when you make the maximum setting exceed the minimum, the control definition function makes the scroll bar active again.

SEE ALSO
Listing 5-16 on page 5-38 illustrates the use of SetControlMaximum to specify the maximum setting for a scroll bar.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996