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

RemoveGadget

Remove a gadget from a window.

Declaration

Source position: intuition.pas line 3488

function RemoveGadget(

  Window: PWindow;

  Gadget: PGadget

):Word;

Arguments

Window

  

A pointer to the window containing the gadget or the requester containing the gadget to be removed.

Gadget

  

A pointer to the gadget to be removed. The gadget itself describes whether this is a gadget that should be removed from the window or some requester.

Function result

Returns the ordinal position of the removed gadget. If the gadget wasn't found in the appropriate list, or if there are no gadgets in the list, returns $FFFF.

Description

Removes the given gadget from the gadget list of the specified window. Returns the ordinal position of the removed gadget.

If the gadget is in a requester attached the the window, this routine will look for it and remove it if it is found.

If the gadget pointer points to a gadget that isn't in the appropriate list, $FFFF is returned. If there aren't any gadgets in the list, $FFFF is returned. If you remove the 65535th gadget from the list $FFFF is returned.

Note: If one of the gadgets you wish to remove is the active gadget, this routine will wait for the user to release the mouse button before deactivating and removing the gadget.

See also

AddGadget

  

Add a gadget to the gadget list of a window.

AddGList

  

Add a linked list of gadgets to a window or requester.

RemoveGList

  

Remove a sublist of gadgets from a window.


Documentation generated on: 2021-07-30