CompuServe Messages

#auto-selecting gadgets

    30-Jan-88 17:09:40
Fm: John Draper 76703,4322
To: Douglas Martin 73547,3210
ActivateGadget — Activate a (String) Gadget. SYNOPSIS Success = ActivateGadget(Gadget, Window, Request) D0 A0 A1 A2 BOOL Success; struct Gadget *Gadget; struct Window *Window; struct Requester *Request; FUNCTION Activates a String 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 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: – The Window must be active. (Use the ACTIVEWINDOW IDCMP). – No other gadgets may be in use. This includes system gadgets, such as those for window sizing, dragging, etc. – If the gadget is in a Requester, that Requester must be active. (Use the REQSET and REQCLEAR IDCMP). – The right mouse button cannot be held down (e.g. menus INPUTS Gadget = pointer to the Gadget that you want activated. Window = pointer to a Window structure containing the Gadget. Requester = pointer to a Requester (may by NULL if this isn't a Requester Gadget (i.e. REQGADGET is not set)). RESULT If the conditions above are met, and the Gadget is in fact a String Gadget, then this function will return TRUE, else FALSE. ————————-From the latest Autodocs, available from CBM… see CBM.DOC in DL 1 Regards, Larry.