Class

MobileTextArea


Description

A multi-line text area for displaying text.

Enumerations

MobileTextArea.BorderStyles

BorderStyles

The styles that can be used for the border of the control.

Enum

Description

None

No border.

Rectangular

A rectangular border.

Rounded

A rounded rectangular border.

Property descriptions


MobileTextArea.AccessibilityHint

AccessibilityHint As String

The accessibility hint is a longer description that is read aloud when VoiceOver is enabled.

Me.AccessibilityHint = "Click to calculate the value and display the next screen."

MobileTextArea.AccessibilityLabel

AccessibilityLabel As String

The accessibility label of of a control is a short name that is read aloud when VoiceOver is enabled.

Me.AccessibilityLabel = "Calculate the value."

MobileTextArea.Alignment

Alignment As MobileTextControl.Alignments

Specifies the alignment of the text in the control.

This code in the control's Opening event sets the alignment to justified:

Me.Alignment = MobileTextControl.Alignments.Justified

MobileTextArea.AllowAutoCorrection

AllowAutoCorrection As Boolean

If True, some misspelled words will be automatically replaced with the correct spellings.

Important

This is supported for iOS only.


MobileTextArea.AllowSpellChecking

AllowSpellChecking As Boolean

If True, misspelled words will be underlined so that the user can use system-provided functions to replace them with the correct spelling.


MobileTextArea.AutoCapitalizationType

AutoCapitalizationType As MobileTextControl.AutoCapitalizationTypes

Dictates the type (if any) of automatic capitalization that should occur.

Important

This is supported for iOS only.


MobileTextArea.BorderStyle

BorderStyle As BorderStyles

The style for the border.

Important

This is supported for iOS only.


MobileTextArea.ControlCount

ControlCount As Integer

The number of child controls in the control.

This property is read-only.

Important

This is supported for iOS only.


MobileTextArea.Enabled

Enabled As Boolean

Indicates whether the control is enabled or disabled.

Disable the button:

Button1.Enabled = False

MobileTextArea.Height

Height As Integer

The height of the control.

This property is read-only on iOS.


MobileTextArea.Left

Left As Integer

The left position of the control.

This property is read-only on iOS.


MobileTextArea.LockBottom

LockBottom As Boolean

Determines whether the bottom edge of the control should stay at a set distance from the bottom edge of the parent control, if there is one, or the owning screen.

Important

This property is not currently supported for iOS. Use constraints instead.

This property can be set in the control's Inspector. The following example sets it in code.

Me.LockBottom = True

MobileTextArea.LockLeft

LockLeft As Boolean

Determines whether the left edge of the control should stay at a set distance from the left edge of the parent control, if there is one, or the owning screen.

LockLeft and Locktop default to True when you add a new control to a screen. Existing controls will be altered only if LockRight and/or LockBottom are not set. LockLeft has no effect unless LockRight is True.

Important

This property is not currently supported for iOS. Use constraints instead.

This property can be set in the control's Inspector. The following example sets it in code.

Me.LockLeft = True

MobileTextArea.LockRight

LockRight As Boolean

Determines whether the right edge of the control should stay at a set distance from the right edge of the parent control, if there is one, or the owning screen.

Important

This property is not currently supported for iOS. Use constraints instead.

This property can be set in the control's Inspector. The following example sets it in code.

Me.LockRight = True

MobileTextArea.LockTop

LockTop As Boolean

Determines whether the top edge of the control should stay at a set distance from the top edge of the parent control, if there is one, or the owning screen.

LockTop and LockLeft default to True when you add a control to a screen. Existing controls will be altered only if LockRight and/or LockBottom are not set. LockTop has no effect unless LockBottom is True.

Important

This property is not currently supported for iOS. Use constraints instead.

This property can be set in the control's Inspector. The following example sets it in code.

Me.LockTop = True

MobileTextArea.MaximumCharactersAllowed

MaximumCharactersAllowed As Integer

The maximum number of characters allowed in the MobileTextArea.

The value of zero does not limit text. MaximumCharactersAllowed works for normal text entry, copy and paste, and drag and drop.

There may be maximum limits imposed by the operating system.


MobileTextArea.Name

Name As String

The name of the control.

This property is read-only.


MobileTextArea.Parent

Parent As MobileUIControl

The parent (sometimes called a "Super") class of the control.

This property is read-only.


MobileTextArea.ReadOnly

ReadOnly As Boolean

Indicates if the text is read-only.


MobileTextArea.SelectedText

SelectedText As String

The text that is selected.


MobileTextArea.SelectionLength

SelectionLength As Integer

The number of characters selected.


MobileTextArea.SelectionStart

SelectionStart As Integer

The position of the first character in the selected text.


MobileTextArea.Text

Text As String

The text in the control.

The following code sets the text of the control in any of its events:

Me.Text = "One ring to rule them all..."

MobileTextArea.TextColor

TextColor As Color

The color of the text in the control.


MobileTextArea.TextColor

TextColor As ColorGroup

The color of the text in the control.

Important

Using a ColorGroup is not currently supported for Android.

Placed in any of the control's events, this code changes the text color to blue:

Me.TextColor = Color.Blue

MobileTextArea.TextFont

TextFont As Font

A Font object that provides information about the control's font name, font size, and more.

From any of the control's events, this example changes the font:

Me.TextFont = Font.BoldSystemFont(20)

MobileTextArea.TintColor

TintColor As ColorGroup

Changes a control's tint color.

Important

This is supported for iOS only.

On iOS, the following controls support TintColor:

Enum

Description

ProgressBar

The area indicating the value of the control will be drawn in the TintColor.

Slider

The area indicating the value of the control will be drawn in the TintColor.

TextArea

The cursor and text highlight color will be drawn in the TintColor.

TextField

The cursor and text highlight color will be drawn in the TintColor.


MobileTextArea.Top

Top As Integer

The top position of the control.

This property is read-only on iOS.


MobileTextArea.Visible

Visible As Boolean

Indicates whether the control is visible.

Make a button invisible:

Button1.Visible = False

MobileTextArea.Width

Width As Integer

The width of the control.

This property is read-only on iOS.

Method descriptions


MobileTextArea.AddConstraint

AddConstraint(constraint As iOSLayoutConstraint)

Adds a constraint to the control.

This constraint is used by child controls that have been added to this control.

Important

This is supported for iOS only.


MobileTextArea.AddControl

AddControl(child As MobileUIControl)

Adds a child control to the control.

Important

This is supported for iOS only.


MobileTextArea.AddText

AddText(text As String)

Appends the text to the existing text in the control.


MobileTextArea.ClearFocus

ClearFocus

Removes the focus from the control.

TextField1.ClearFocus

MobileTextArea.ControlAt

ControlAt(index As Integer) As MobileUIControl

Gets the child control at the specified index.

Important

This is supported for iOS only.


MobileTextArea.Controls

Controls As Iterable

Allows you to iterate through all the controls that have been added to this control.

Important

This is supported for iOS only.


MobileTextArea.Handle

Handle As Ptr

The handle to the underlying native OS control.


MobileTextArea.Refresh

Refresh

Marks the control so that it will be redrawn during the next event loop.

Call Refresh to force a Canvas to redraw itself:

Canvas1.Refresh

MobileTextArea.RemoveConstraint

RemoveConstraint(constraint As iOSLayoutConstraint)

Removes a constraint from the control.

Important

This is supported for iOS only.


MobileTextArea.RemoveControl

RemoveControl(child As MobileUIControl)

Removes the control from the control.

Important

This is supported for iOS only.


MobileTextArea.SelectAll

SelectAll

Selects all text in the control.


MobileTextArea.SetFocus

SetFocus

Sets the focus to the control.

TextField1.SetFocus

Event descriptions


MobileTextArea.Closing

Closing

Called when the control's layout is closing.


MobileTextArea.FocusLost

FocusLost

The MobileTextArea has lost the focus.

Important

This event is currently supported for iOS only.


MobileTextArea.FocusReceived

FocusReceived

The MobileTextArea has received the focus and has a selection rectangle around it.

Important

This event is currently supported for iOS only.


MobileTextArea.KeyDown

KeyDown(key As String) As Boolean

The user has pressed the key passed while the MobileTextArea has the focus.

Returning True means the key is intercepted, preventing the key from actually reaching the control at all. This would be useful if you want to override the behavior of the tab key for example. Returning False means the key reaches the control.

Important

This is supported for iOS only.


MobileTextArea.Opening

Opening

Called when the control's layout is opening.

This is where you typically put initialization code.

This example in the Opening event of a label sets its text to "Hello":

Me.Text = "Hello"

MobileTextArea.SelectionChanged

SelectionChanged

Called when the text selection has changed.


MobileTextArea.TextChanged

TextChanged

Called when the text changes.

Update a label with the text as it changes:

DescLabel.Text = Me.Text

Compatibility

Mobile projects on all supported mobile operating systems.

See also

MobileTextControl parent class; MobileTextField control