Class

iOSTextArea


Warning

This item was deprecated in version 2020r2. Please use MobileTextArea as a replacement.

Description

A multi-line text area for displaying text.

Events

Name

Parameters

Returns

Close

Open

SelChange

TextChange

Enumerations

iOSTextArea.BorderStyles

BorderStyles

The styles that can be used for a border (None, Rectangular, Rounded).

Enum

Description

None

No border.

Rectangular

A rectangular border.

Rounded

A rounded rectangular border.

Property descriptions


iOSTextArea.AccessibilityHint

AccessibilityHint As Text

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 view."

iOSTextArea.AccessibilityLabel

AccessibilityLabel As Text

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

Me.AccessibilityLabel = "Calculate the value."

iOSTextArea.BorderColor

BorderColor As ColorGroup

The border color.


iOSTextArea.BorderStyle

BorderStyle As BorderStyles

The style for the border.


iOSTextArea.Editable

Editable As Boolean

Indicates if the text is editable or read-only.

If the text area is not editable, the user can still select and copy the text within it.

Make the text field read-only:

DescArea.Editable = False

iOSTextArea.Height

Height As Double

The height of the control.

This property is read-only.


iOSTextArea.Left

Left As Double

The left position of the control.

This property is read-only.


iOSTextArea.Name

Name As Text

The name of the control. This can only be set in the Inspector. Use the name to refer to the control.

This property is read-only.


iOSTextArea.Parent

Parent As iOSControl

Indicates the control's parent object, if it has one. If there is no parent, this is Nil.

This property is read-only.


iOSTextArea.Text

Text As Text

The text of the text area.

Set the text of the text area:

TextArea1.Text = "Hello, World!"

Get the text in the text area:

Var desc As Text
desc = TextArea1.Text

iOSTextArea.TextAlignment

TextAlignment As iOSTextAlignment

The alignment of the text.

Center-align the text:

TextArea1.TextAlignment = iOSTextAlignment.Center

iOSTextArea.TextColor

TextColor As Color

The color of the text.

Make the text red:

TextArea1.TextColor = Color.Red

iOSTextArea.TextFont

TextFont As iOSFont

The font used to display the text.

Use the bold system font:

TextArea1.TextFont = iOSFont.BoldSystemFont

iOSTextArea.Top

Top As Double

The top position of the control.

This property is read-only.


iOSTextArea.Visible

Visible As Boolean

Indicates whether the control is visible.

Make a button invisible:

Button1.Visible = False

iOSTextArea.Width

Width As Double

The width of the control.

This property is read-only.

Method descriptions


iOSTextArea.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.


iOSTextArea.AddControl

AddControl(child As MobileControl)

Adds a child control to the control.


iOSTextArea.Control

Control(index As Integer) As MobileControl

Gets the child control at the specified index.


iOSTextArea.ControlCount

ControlCount As Integer

The number of child controls in the control.


iOSTextArea.Handle

Handle As Ptr

The handle is used to get a reference to the control for interfacing directly with the iOS API.


iOSTextArea.Invalidate

Invalidate

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

Call Invalidate to force a Canvas to redraw itself:

Canvas1.Invalidate

iOSTextArea.RemoveConstraint

RemoveConstraint(constraint As iOSLayoutConstraint)

Removes a constraint from the control.


iOSTextArea.RemoveControl

RemoveControl(child As MobileControl)

Removes the control from the control.


iOSTextArea.SetTintColor

SetTintColor(value As Color)

Changes a control's tint color. This varies by control and for some controls may not do anything. For example, with an MobileTextField this changes the cursor color.

Event descriptions


iOSTextArea.Close

Close

Called when the control is removed from its container, such as a view.


iOSTextArea.Open

Open

Called after the control is created. This is where you typically put initialization code.

Set label text in Open event:

Me.Text = "Hello"

iOSTextArea.SelChange

SelChange

Called when the text selection changes.


iOSTextArea.TextChange

TextChange

Called when the text changes.

Update a label with the text as it changes:

DescLabel.Text = Me.Text

Compatibility

iOS projects on the iOS operating system.

See also

MobileControl parent class; MobileTextField control