Activate a (string or custom) gadget.
Source position: intuition.pas line 3264
function ActivateGadget( |
Gadget: PGadget; |
Window: PWindow; |
Requester: PRequester |
):LongBool; |
Gadget |
|
A pointer to the gadget that you want activated. |
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)). |
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.