Button

From HTML5 Builder
Jump to: navigation, search

The Button component provides a push button control.

You can use this control to let users start actions. It is completely customizable through properties such as BorderRadius or Gradient, and additionally you can create image-based buttons through its ImageSource property.

Client-side Features

The component generates the following client-side DOM elements:

  • Wrapper (HTMLDivElement). Access it with $("#ComponentName_outer").get()[0].

Client-side Events

This component inherits the following client-side events:

Server-side Features

Properties

In addition to its own properties (documented below), this component also inherits the following:

ButtonType

Type of button to be used, according to the expected behavior.

The possible values are:

  • btSubmit. Submits the page's HTML form when clicked.
  • btReset. Resets the input fields (Edit, ComboBox, etc.) in the page's HTML form back to their initial values.
  • btNormal. Regular button, with no default effect (you need to define server or client-side events to add interaction to it).

Default

Whether the handler for the OnClick event should be executed when the Enter key is pressed (true), or not (false).

If this property is set to true, the control will behave as if the ButtonType were btSubmit, no matter what its actual value is.

ImageSource

Path to an image file to be used for the surface of the control.

To avoid distortion, make sure the Height and Width of the control matches those of the image file.

Server-side Events

This component inherits the following server-side events:

Inheritance

Help Resources

Sample Applications

In the following folders inside the sample applications directory you will find projects covering this component:

  • Button. How to use the component.