Terrapin Resources

Edit boxes

Extends: EDITBOX > CONTROL > WIDGET

Edit boxes let the user enter a single line of text. Edit boxes offer a few of their own properties on top of the CONTROL properties.


FILTER

Part of: EDITBOX

Gets or sets the edit field’s input filter.

Syntax

GPROP "EDITBOX "FILTER
PPROP "EDITBOX "FILTER word

Description

The FILTER property can be set to a list of characters that the user is allowed to enter. Characters other than defined in the filter are ignored.

Examples

DRAW ; Drop a EDITBOX widget from the Toolbox > Controls EDITBOX dropped PPROP “EDITBOX “FILTER “1234567890


LIMIT

Part of: EDITBOX

Limits the number of character that a user can enter into an edit box.

Syntax

GPROP "EDITBOX "LIMIT
PPROP "EDITBOX "LIMIT number

Description

The LIMIT property limits the number of characters that a user can enter into a text box. The value can be any number between 1 and 1000; initially, this value is 1000.

Examples

DRAW ; Drop a EDITBOX widget from the Toolbox > Controls EDITBOX dropped PPROP “EDITBOX “LIMIT 5


MODIFIED

Part of: EDITBOX

Reports whether the contents of an edit box have been modified.

Syntax

GPROP "EDITBOX "MODIFIED
PPROP "EDITBOX "MODIFIED TRUE/FALSE

Description

Whenever the user changes the text of an edit box, its MODIFIED property is set to TRUE. A user can set the property to FALSE to reset that flag.

Examples

DRAW ; Drop a EDITBOX widget from the Toolbox > Controls EDITBOX dropped PPROP “EDITBOX “MODIFIED FALSE


PLACEHOLDER

Part of: EDITBOX

Gets or sets the edit field’s placeholder text.

Syntax

GPROP "EDITBOX "PLACEHOLDER
PPROP "EDITBOX "PLACEHOLDER text

Description

The PLACEHOLDER gets or sets a ghost text that vanishes once the user starts typing. It should indicate what the user should type into the text box.

Examples

DRAW ; Drop a EDITBOX widget from the Toolbox > Controls EDITBOX dropped PPROP “EDITBOX “PLACEHOLDER “|Type your name here|