Blitz3D+ Command Reference

DisableGadget gadget

Parameters

gadget - gadget to disable

Description

Disables a gadget so the user cannot interact with it.

Requires Extended language mode.

The gadget greys out, stops taking clicks and keyboard focus, and posts no more user events - the standard way to show a command is not valid right now: an Apply button while nothing is selected, an export panel while no level is loaded.

Disabling a group such as a panel or group box blocks input to everything inside it, which is a quick way to freeze a whole section of a dialog. Your code can still drive a disabled gadget - SetGadgetText, SetGadgetShape and the rest keep working - and EnableGadget switches it back on. Gadgets start out enabled.

To take a gadget off the screen entirely rather than grey it out, use HideGadget instead.

The world editor shell sample shows the kind of editor UI this state management belongs to.

See also: EnableGadget, HideGadget, ShowGadget, DisableMenu, DisableToolBarItem.

Index