FMX.ControlsDemo Sample

From RAD Studio XE2 Code Examples
Jump to: navigation, search

Language:

Versions:

This sample exemplifies how to use FireMonkey controls.

Contents

Location

You can find the ControlsDemo sample project at:

Description

This application uses several controls, sorted by categories in a TabControl.

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio XE2 > Samples and open ControlsDemo.dproj.
  2. Press F9 or choose Run > Run.

Classes

FireMonkey 2D Animation represents the main window of the sample. It contains the following components:

Implementation

This sample uses all the FireMonkey controls and shows their functionality. The sample has a main menu, with two menu items. The first menu item (File) has two options: Load Style... (allows the user to load a different style) and Exit (closes the program). The second menu item (Help) can be used for accessing the About box, which can contain information about the project.

The form contains a layout with a tab control. The first tab item is called Standard and shows the standard controls, like labels, buttons, radio buttons, check box, and edit box. The progress bar has its BindingSource property set to ScrollBar1, so changing the value of the scroll bar automatically changes the value of the progress bar. When selecting the MultiSelect check box, the list box above allows the selection of multiple items. The callout panel changes the callout position according to the radio button selection.

The second tab item (Additional) contains controls like calendar edits, group box, expander, calendar, memo, number box, track bar, angle button. Clicking one of the angle buttons changes the value of the label to the value of the selected angle button.

The third tab item is named Ext Controls and it contains a drop target and a clearing edit.

The Transformations tab shows two track bars that can set the rotation angle and opacity of the edit box and list box. TreeView and ListBox is the fifth tab and it contains a list box with list box items with different content (labels, images, paths, buttons). The tree view has several tree view items, displayed on three levels. The check box labeled as UseSmallScrollBars can change the value of the property with the same name of the tree view and list box.

The ScrollBox tab contains a scroll box and a vertical scroll box with several expander objects.

The seventh tab, Memo, contains a memo.

The last tab item is named New! and it contains new FireMonkey-specific controls. The check boxes around the first button can be used for changing the style of the button's corners. The track bar's value sets the X and Y radius for the corners.

On the form's bottom there is a status bar containing a track bar for scaling the main layout and a button for changing the application to 3D and back.

Uses

See Also

Personal tools
Previous Versions