Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

ActivateGadget

Activate a (string or custom) gadget.

Declaration

Source position: intuition.pas line 3879

function ActivateGadget(

  Gadgets: PGadget;

  Window: PWindow;

  Requester: PRequester

):LongBool;

Arguments

Window

  

A pointer to a window structure containing the gadget.

Requester

  

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.

Description

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: 2021-07-30