onComponentEvents([callback], [remove])
Class: TextField. Method inherited from UIComponent.
Description:
Gets, registers or unregisters an event handler function for events: resize, move, show, hide.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
function |
The event handler function that receives a ComponentEvent object. Pass |
|
|
|
boolean |
false |
Set to |
Returns:
An array of handler functions if no arguments are passed, otherwise this component for method chaining.
Type: this | Array.<function()>
Examples:
// Example event object:
const e = {
target: object, // The component that triggered the event.
type: string, // `resize`, `move`, `show`, `hide`.
interactive: boolean, // Indicates if the event was triggered by user's interaction (not programmatically). Present when e.type is `move` or `resize`.
x: number, // New x position of component.
y: number, // New y position of component.
width: number, // New width of component. Present when e.type is `resize`.
height: number, // New height of component. Present when e.type is `resize`.
innerWidth: number, // New width of content area of the component. Present when e.type is `resize` and component is Window or InternalWindow.
innerHeight: number, // New height of content area of the component. Present when e.type is `resize` and component is Window or InternalWindow.
};
