SG_StringGadget

Syntax:

Result=SG_StringGadget(SG_GadgetID_L.l, X_Pos_L.l, Y_Pos_L.l, Width_L.l, Height_L.l, GadgetText_S.s, [Flags_L.l])

Parameters:

SG_GadgetID_L

=

The number of the gadget

X_Pos_L

=

the x-position of the gadget

Y_Pos_L

=

the y position of the gadget

Width_L

=

the width of the gadget

Height_L

=

the height of the gadget

GadgetText_S

=

the text of the item

[Flags_L]

=

'Flags' are always optional and can be composed of one or several (using the bitwise OR operator '|') of the following constants:

#PB_String_Numeric : Only numbers are accepted.

=

#PB_String_Password : Password mode, displaying only '*' instead of normal characters.

=

#PB_String_ReadOnly : Read only mode. No text can be entered.

=

#PB_String_LowerCase : All characters are converted to lower case automatically.

=

#PB_String_UpperCase : All characters are converted to upper case automatically.

=

#PB_String_BorderLess : No borders are drawn around the gadget.

=


Return Values:

Result

=

contains a pointer to the internal gadget structur. See the source of this lib for more information


Description:

Creates a String gadget in the current screen. SG_GadgetID_L will be the number returned by SG_EventScreenGadgetID() command. 'Content$' specifies the initial content of this StringGadget.

Later the content can be changed with SG_SetGadgetText() and received with SG_GetGadgetText().


Example:


Remarks:

The flags of the textgagdet will also work here.

For editing gadgets (currently Stringgadgets and Editorgadgets) there are the following keys availalble:

- All Chars

- Up

- Down

- Left

- Right

- Home

- End

- Del

- Backspace



Supported OS:   Windows