Overview

The custom buttons sample application demonstrates how to extend the Field class to create a variety of different button UI components.

The sample application demonstrates how to create the following types of buttons:
  • rectangle
  • triangle
  • octagon
  • rectangle with a fixed width
  • rectangle with a fixed width and a long text label
  • rectangle with a full screen width
  • rectangle with a color background
  • rectangle with a .bmp image as the background

In addition to creating and displaying these custom buttons, the sample application also demonstrates how to attach listeners to these custom buttons. Listeners are components that execute code when an event occurs. In the sample application, when you click one of these buttons, a dialog box appears with text specifying which of the buttons you clicked.

Next topic: Featured classes

Was this information helpful? Send us your comments.