Result = StringGadget3D(#Gadget3D, x, y, Width, Height, Content$ [, Flags])
Creates a String gadget in the current GadgetList. This gadget accepts only one line of text. To get multi-line input, use the EditorGadget3D() function.


#Gadget3D A number to identify the new 3D gadget. #PB_Any can be used to auto-generate this number.
x, y, Width, Height The position and dimensions of the new gadget.
Content$ The initial text content.
Flags (optional) It can be a combination of the following values:
  #PB_String3D_Numeric    : Only (positive) integer numbers are accepted.
  #PB_String3D_Password   : Password mode, displaying only '*' instead of normal characters.
  #PB_String3D_ReadOnly   : Read-only mode. No text can be entered.

Return value

Nonzero on success, zero otherwise. If #PB_Any was used as the #Gadget3D parameter then the return-value is the auto-generated gadget number on success.


Later the content can be changed with SetGadgetText3D() and received with GetGadgetText3D().

The following events are supported through EventType3D():
  #PB_EventType3D_Change    : The text has been modified by the user.
  #PB_EventType3D_Focus     : The StringGadget got the focus.
  #PB_EventType3D_LostFocus : The StringGadget lost the focus.
To add a 'mini help' to this gadget, use GadgetToolTip3D().

Supported OS


<- SpinGadget3D() - Gadget3D Index - TextGadget3D() ->