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 / Determining Control Values


GetControlValue

To determine a control's current setting, use the GetControlValue function. The GetControlValue function is also available as the GetCtlValue function.

FUNCTION GetControlValue (theControl: ControlHandle): Integer;
theControl
A handle to a control.
DESCRIPTION
The GetControlValue function returns as its function result the specified control's current setting, which is stored in the contrlValue field of the control record.

When you create a control, you specify an initial setting either in the control resource or in the value parameter of the NewControl function. You can change the setting by using the SetControlValue procedure.

SEE ALSO
Listing 5-12 on page 5-33 and Listing 5-13 on page 5-35 illustrate the use of GetControlValue for determining the current setting of, respectively, a pop-up
menu and a checkbox. Listing 5-16 on page 5-38, Listing 5-18 on page 5-48, and
Listing 5-20 on page 5-56 illustrate the use of this function for determining the
current setting of a scroll bar.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996