[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Activate a (string or custom) gadget.


Source position: intuition.pas line 3264

function ActivateGadget(

  Gadget: PGadget;

  Window: PWindow;

  Requester: PRequester





A pointer to the gadget that you want activated.



A pointer to a window structure containing the gadget.



A pointer to a requester (may by nil if this isn't a requester gadget (i.e. GTYP_REQGADGET is not set)).

Function result

If the conditions are met, and the gadget is in fact a string gadget, then this function will return True, else False.


Activates a string or custom gadget. If successful, this means that the user does not need to click in the gadget before typing.

The window parameter must point to the window which contains the gadget. If the gadget is actually in a requester, the window must contain the requester, and a pointer to the requester must also be passed. The requester parameter must only be valid if the gadget has the GTYP_REQGADGET flag set, a requirement for all requester gadgets.

The success of this function depends on a rather complex set of conditions. The intent is that the user is never interrupted from what interactions he may have underway.

The current set of conditions includes:

Note: Don't try to activate a gadget which is disabled or not attached to a window or requester.

Documentation generated on: 2017-01-10