This sample exemplifies how to use FireMonkey controls.
You can find the ControlsDemo sample project at:
- Start > Programs > Embarcadero RAD Studio XE2 > Samples and then navigate to FireMonkey\ControlsDemo
- Subversion Repository for Delphi: http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE2/FireMonkey/ControlsDemo/
This application uses several controls, sorted by categories in a TabControl.
How to Use the Sample
- Navigate to Start > Programs > Embarcadero RAD Studio XE2 > Samples and open ControlsDemo.dproj.
- Press F9 or choose Run > Run.
FireMonkey 2D Animation represents the main window of the sample. It contains the following components:
- A TMenuBar with two TMenuItems, each of them containing several other TMenuItems
- A TOpenDialog
- A TLayout containing another TLayout, with a TTabControl with several TTabItems
- The first TTabItem, called Standard, contains the following controls:
- The second TTabItem, called Additional, contains the following controls:
- The third TTabItem, called ExtControls, contains the following controls:
- The fourth TTabItem, called Transformations, contains the following controls:
- The fifth TTabItem, called TreeView and ListBox, contains the following controls:
- The sixth TTabItem, called ScrollBox, contains the following controls:
- The seventh TTabItem, called Memo, contains a TMemo.
- The eighth TTabItem, called New!, contains the following controls:
- A TStatusBar, containing the following controls:
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.