Button | API - NativeScript

Represents a standard Button widget.

Summary

Methods

on

111 methods inherited from TextBase

Click to expand

Constructors

constructor

Properties

android

Gets the native [android widget](http://developer.android.com/reference/android/widget/Button.html) that represents the user interface for this component. Valid only when running on Android OS.

ios

Gets the native [UIButton](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class/) that represents the user interface for this component. Valid only when running on iOS.

textWrap

Gets or sets whether the Button wraps text or not.

String value used when hooking to tap event.

Methods

on

on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void

A basic method signature to hook an event listener (shortcut alias to the addEventListener method).

on(event: "tap", callback: (args: EventData) => void, thisArg?: any): void

Raised when a tap event occurs.

Previous
Builder

Next
ChangeType