TextArea Events
TextArea widget has the following events associated with it:
doLayout Event
This event is invoked for every widget when the widget position and dimensions are computed.
Syntax
Read/Write
Read + Write
Remarks
This event is invoked for all the widgets placed inside flex containers. This event is invoked in the order in which the widgets are added to the widget hierarchy and expect the frame property of the widget is calculated and available for use within this event.
This event is used to set the layout properties of child widgets in the relation to self and peer widgets whose layout is not yet performed.
The number of times this event invoked may vary per platform. It is not recommended to write business logic assuming that this function is invoked only once when there is a change in positional or dimensional properties. This event will not trigger when transformations are applied though widget is moved or scaled or rotated from its original location.
Example
Platform Availability
- iOS, Android, Windows, and SPA
onBackKeyPress Event
This is event callback is invoked by the Android platform when the soft- keyboard is open and the back button of the device is clicked.
This event is not be triggered when you use gestures in the mobile device for back navigation.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Android
onBeginEditing Event
This is an event callback that is invoked by the platform when the user clicks within the TextArea and is about to start editing.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- iOS and Android
onDone Event
This event is triggered when user is done with entering text in textarea and click or touch the Go or Enter option.
Syntax
Read/Write
Read + Write
Remarks
In Desktop Web platform, this event is fired when the enter key is pressed when the textarea has focus.
Example
Platform Availability
- Available in the IDE
- Available on all platforms except SPA
onEndEditing Event
This is an event callback that is invoked by the platform.
Syntax
Read/Write
Read + Write
Remarks
This is event is invoked when the user performs one of the below actions:
- Click on any other focusable widget (for example, another TextBox)
- Click on the Done button on the Next Previous bar.
- Click on the Done button on the keypad.
When you click on the Done button of the keypad the following events take place in a sequence:
- onendediting
- ondone
Example
Platform Availability
- Available in the IDE
- iOS and Android
onKeyboardDidHide Event
This is event callback is invoked by the Android platform when the soft keyboard has been closed.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Android
onKeyboardDidShow Event
This is event callback is invoked by the Android platform when the soft keyboard has been just brought into view.
Syntax
Read/Write
Read + Write
Limitation
- In Android platform, when you close the soft keyboard using back button, and then re-select the text by long-press in TextArea and TextBox widget, the
onKeyBoardDidShow
event is not triggered.
Example
Platform Availability
- Android
onKeyboardWillHide Event
This is event callback is invoked by the Android platform when the soft keyboard is about to be hidden.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Android
onKeyboardWillShow Event
This is event callback is invoked by the Android platform when the soft keyboard is about to be displayed.
Syntax
Read/Write
Read + Write
Limitation
- In Android platform, when you close the soft keyboard using back button, and then re-select the text by long-press in TextArea and TextBox widget, the
onKeyBoardWillShow
event is not triggered.
Example
Platform Availability
- Android
onKeyDown Event
This is an event callback that is invoked by the platform when the user presses a key (on the keyboard).
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- Desktop Web and SPA
onKeyUp Event
This is an event callback that is invoked by the platform when the user releases a key (on the keyboard).
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- Desktop Web and SPA
onScrollWidgetPosition Event
This event callback is invoked by the platform when the widget location position gets changed on scrolling. The onScrollWidgetPosition event returns the positional coordinates of the widget’s location with respect to the screen (screenX and screenY) and the parent container (frameX and frameY). This event is invoked asynchronously, and is not available for FlexForm widget.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- Not Accessible from IDE
- Android, iOS, SPA, and Windows
onTextChange Event
This is an event callback triggered when text in the TextArea changes.
Syntax
Read/Write
Read + Write
Remarks
This event is not fired when the text is changed programmatically.
On the Desktop Web and SPA platforms, this event is fired when the focus is out of the text area.
Example
Platform Availability
- Available in the IDE
- Available on all platforms.