ButtonGadget3D()

Syntax

Result = ButtonGadget3D(#Gadget3D, x, y, Width, Height, Text$ [, Flags])
Description
Create a button gadget in the current GadgetList. If #PB_Any is used as '#Gadget3D' parameter, the new gadget number will be returned as 'Result'. #Gadget3D will be the number returned by EventGadget3D() function.

'Flags' are always optional and can be composed of one or several (using the bitwise OR operator '|') of the following constants:
  #PB_Button3D_Toggle    : Creates a toggle button: one click pushes it, another will release it.
To add a 'mini help' to this gadget, use GadgetToolTip3D().

The following functions can be used to control the gadget:

- SetGadgetText3D(): Changes the text of the ButtonGadget.
- GetGadgetText3D(): Returns the text of the ButtonGadget.
- SetGadgetState3D(): Used with #PB_Button3D_Toggle buttons to set the actual state (1 = toggled, 0 = normal).
- GetGadgetState3D(): Used with #PB_Button3D_Toggle buttons to get the actual state of the button (1 = toggled, 0 = normal).

Supported OS

All

<- AddGadgetItem3D() - Gadget3D Index - CheckBoxGadget3D() ->