FMX.Mobile.Controls Sample (Object Pascal)
This is a sample that shows component styling in mobile applications using FireMonkey.
You can find the FireMonkeyMobile Controls project at:
- Start | Programs | Appmethod 1.16 | Samples and then navigate to either:
Object Pascal\Mobile Samples\User Interface\Controls
CPP\Mobile Samples\User Interface\Controls
- Subversion Repository for Object Pascal: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8//Object%20Pascal/Mobile%20Samples/User%20Interface/Controls
- Subversion Repository for C++: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8//CPP/Mobile%20Samples/User%20Interface/Controls
This application uses tabbed pages (TTabControls), on which you can see various FireMonkey mobile controls, such as ToolBars, Tool Buttons, ListBoxes, Tabs, Controls, and Editors.
How to Use the Sample
- Navigate to the one of the locations given above, and open:
- Object Pascal: MobileControls.dproj
- C++: MobileControls.cbproj
- Press F9 or choose Run > Run.
- Note: The Back button will navigate tabs until the leftmost tab is reached, and will exit at the leftmost tab. So when you capture Back events, consider how to control when this 'falling off' occurs.
TForm1 is the main form of the application and contains all the visual controls that are displayed.
For different stylings of the same control, the StyleLookup property is used:
- On the first tab, the StyleLookup property for one TSpeedButton is set to deletetoolbutton, and therefore the button is rendered red and labeled Delete.
- The StyleLookup property of the speed button next to the Delete button is set to donetoolbutton and therefore, the button is rendered blue and labeled Done.