The Entry component acts a simple one-line text entry.
Standard Properties
clipboardable, copyable, deletable, enabled, focusable, focusState, height, left, look, sizeHControl, sizeVControl, top, version, visible, width.
sizeHControl, sizeVControl: SIZE_AS_NEEDED is only partially supported: when the component becomes visible and has height or width of zero, the component will re-size itself to a default value.
filter integer (0-)
Filter to use when accepting characters. The following filters are supported:
0 No filter
1 Custom: generate _filterChar() events.
32 Numeric characters only
36 Alphanumeric: alphabetic and numeric characters
42 Dashed alphanumeric: alphanumeric and "-"
If you assign a value to this property corresponding to a filter not supported on the platform, the value will be ignored.
maxChars integer (0-250)
Use this property to impose a maximum number of characters on the entry's text. If this property is changed to be less than the current length of the entry's text, the text will be truncated. If maxChars is zero, then the string may be up to 1000 characters long.
numChars integer (0-maxChars)
Number of characters in the current text. This property is read-only; to change it, change the .text property
text string
The entry's current text. This string may be up to 1000 characters long.
This event is generated when the user is done entering text--when the user, editing the text, presses the Enter key, the Tab key, or clicks on some other component.
self entry
The Entry experiencing the event.
_filterChar( self AS entry, newChar AS integer, replaceStart AS integer, replaceEnd AS integer, endOfGroup AS integer ) AS integer
This event is generated when the user enters a character into the text and the filter property is 1. This event will not catch Enter characters, which generate the _entered() event. If the user pastes a multiple-character string into the Entry, it will generate one _filterChar() event for each character in the string. The endOfGroup argument signals that this is the last character of such a multi-character string.
The event handler should return the Unicode value of the character to insert in the string, or zero to specify that no character should be inserted at this time.
self entry
The Entry experiencing the event.
newChar integer
The Unicode value of the character entered.
replaceStart integer (0-numChars)
Offset of the start of the range of characters being replaced.
replaceEnd integer (replaceStart-numChars)
Offset of the end of the range of characters being replaced. If this is the same as replaceStart, then no characters are being replaced, but this is the offset of the insertion point.
endOfGroup integer (0-1)
This argument is one if this character is the last character of a multi-character insert (or the only character of a single-character insert). It is zero otherwise.