TextEdit

From Xojo Documentation

Class (inherits from RectControl)

The base class for TextField and TextArea. TextEdit is an abstract class and should not be instantiated directly. Use the TextField and TextArea controls in windows. ListBox.ActiveTextControl is a TextEdit object.

Events
Closing DragOver MouseEnter
ConstructContextualMenu DropObject MouseExit
ContextualMenuAction KeyDown MouseMove
DragEnter KeyUp MouseWheel
DragExit MenuSelected Opening


Properties
Active fa-lock-32.png Index fa-lock-32.png SelectionLength
AllowAutoDeactivate Italic SelectionStart
AllowFocusRing Left TabIndex
AllowSpellChecking LiveUpdate TextAlignment
AllowTabStop LockBottom TextColor
AllowTabs LockLeft Tooltip
BackgroundColor LockRight Top
Bold LockTop Transparent
Enabled MouseCursor TrueWindow fa-lock-32.png
FontName MouseX fa-lock-32.png Underline
FontSize MouseY fa-lock-32.png ValidationMask
FontUnit Name fa-lock-32.png Value
Format PanelIndex Visible
Handle fa-lock-32.png Parent Width
HasBorder ReadOnly Window fa-lock-32.png
Height Scope fa-lock-32.png
HorizontalScrollPosition SelectedText


Methods
AcceptFileDrop CharacterPosition LineNumber
AcceptPictureDrop Close Paste
AcceptRawDataDrop Copy Refresh
AcceptTextDrop DrawInto SelectAll
AddText InsertionPoint SetFocus
CharacterPosition Invalidate

Notes

TextEdit is the base class for both TextArea and TextField. TextEdit is an abstract class and it is not intended for instantiation. Use TextArea for multiline and styled controls and TextField for single line text fields.

Execution order of MenuHandlers

The intrinsic control menu handlers (such as TextField.SelectAll) are handled after any user-defined menu handlers on the TextField subclass (if it was subclassed). This means that if you have a SelectAll handler on the Window of the TextField, it will no longer be called when the TextField has focus, because the TextField will now handle it first. In this situation, create a TextField subclass that defines its own SelectAll handler, and handle the desired behavior there.

Masks

Use the ValidationMask property to filter user input on a character-by-character basis and add formatting characters. For example, a mask for a Telephone number field can add parentheses, spaces, and dashes as literals, that are used for formatting, and the digit mask symbol '#' to restrict entry to numbers only. See ValidationMask for details.

See Also

RectControl, TextArea, TextField classes.