| Class TextField |
#
A class for a single input line of text. The text can
scroll within the area specified. By default, a border
surrounds the text area; this can be turned of by using
{toggle_draw_border()}.
The horizontal size must be set by the {set_size()} method:
there is no default (the vertical size will default, however).
An event is generated when return is pressed (with code 0),
and whenever the contents are changed (with code 1).
@example
@ t := TextField()
@ t$set_pos(50, 250)
@ # Vertical size will default
@ t$set_size(100)
@ t$set_contents("Initial string")
@ self$add(t)
| Details |
| Constructor |
| Methods: |
# Return the present contents of the text field.
Delete
Mouse click - compute new cursor position, re-display
# Set the contents of the field. If not invoked then the initial content is the empty string. @param x The contents
#
Set a filter on the characters allowed to be input to the text field.
@param c The cset of permissible characters.
@example
@ # Permit only hexadecimal characters as input
@ set_filter('0987654321abcdefABCDEF')
| Fields: |