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


SetControlAction

If you set the action procedure to Pointer(-1) when you use TrackControl, you can use the SetControlAction procedure to set or change the action procedure. The SetControlAction procedure is also available as the SetCtlAction procedure.

PROCEDURE SetControlAction (theControl: ControlHandle;
                            actionProc: ProcPtr);
theControl
A handle to the control whose action procedure you wish to change.
actionProc
A pointer to an action procedure defining what action your application takes while the user holds down the mouse button.
DESCRIPTION
The SetControlAction procedure changes the contrlAction field of the control's control record to point to the action procedure specified in the actionProc parameter. If the cursor is in the specified control, TrackControl calls this action procedure
when user holds down the mouse button. You must provide the action procedure, and it must define some action to perform repeatedly as long as the user holds down the mouse button. (The TrackControl function always highlights and drags the control
as appropriate.)

SPECIAL CONSIDERATIONS
The value in the contrlAction field of the control's control record is used
by TrackControl only if you set the action procedure to TrackControl to Pointer(-1).

An action procedure is usually specified in a parameter to TrackControl; you generally don't need to call SetControlAction to change it.

SEE ALSO
Action procedures are described in "Defining Your Own Action Procedures" beginning on page 5-109.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996