DisableGadget()

Syntax

DisableGadget(#Gadget, State)
Description
Disable or enable the gadget.

Parameters

#Gadget The gadget to enable or disable.
State The new state of the gadget. If State = 1, the gadget will be disabled, if State = 0 it will be enabled.

Return value

None.

Example

  If OpenWindow(0, 0, 0, 250, 105, "Disable/enable buttons...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 10, 15, 230, 30, "Disabled Button") : DisableGadget(0, 1)
    ButtonGadget(1, 10, 60, 230, 30, "Enabled Button") : DisableGadget(1, 0)
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

See Also

HideGadget()

Supported OS

All

<- DateGadget() - Gadget Index - EditorGadget() ->