Button

Visible component with the ability to detect clicks. Many aspects of its appearance can be changed and whether it is clickable or enabled as well. It can be changed in the Designer or in the Blocks Editor.

Events

  • Click(): User tapped and released the button.

  • GotFocus(): Indicates the cursor moved over the button so it is now possible to click it.

  • LongClick(): User held the button down.

  • LostFocus(): Indicates the cursor moved away from the button so it is now no longer possible to click it.

  • TouchDown(): Indicates that the button was pressed down.

  • TouchUp(): Indicates that a button has been released.

Methods

  • SetShadow: Place a blurred shadow underneath the text with the specified x, y, radius, color, (e.g. -11,12,13,black).

Properties

  • BackgroundColor: Specifies and returns the button's background color. Also available in the Designer properties.

  • Enabled: If set, user can tap check box to cause action. Also available in the Designer properties.

  • FontBold: If set, button text is displayed in bold. Also available in the Designer properties.

  • FontItalic: If set, button text is displayed in italics. Also available in the Designer properties.

  • FontSize: Point size for button text. Also available in the Designer properties.

  • FontTypeface: Available only in the Designer properties.

  • FontTypefaceCustom: Font family for button text. Also available in the Designer properties.

  • Height: Button height (y-size). Also available in the Designer properties.

  • Image: Image to display on button. Also available in the Designer properties.

  • Shape(designer only): Specifies the button's shape (default, rounded, rectangular, oval). The shape will not be visible if an Image is being displayed.

  • ShowFeedback: Specifies if a visual feedback should be shown for a button that as an image as background. Also available in the Designer properties.

  • Text: Text to display on button. Also available in the Designer properties.

  • TextAlignment(designer only): Left, center, or right.

  • TextColor: Color for button text. Also available in the Designer properties.

  • Visible: Specifies whether the component should be visible on the screen. Value is true if the component is showing and false if hidden. Also available in the Designer properties.

  • Width: Button width (x-size). Also available in the Designer properties.

Last updated