Using Layouts to Arrange Components

From RAD Studio

Go Up to Tutorial: Using FireMonkey Layouts

This tutorial demonstrates how to use FireMonkey layouts to arrange 2D components in a round pattern.

  1. Select File > New > Other... > Delphi Projects > Multi-Device Application > Blank Application:
     Creating a Delphi HD Application
  2. Add a TLayout to the form.
  3. Add to the TLayout:
  4. In the Object Inspector, make the following changes:
    • For the button, set Align to MostTop.
    • For the label, set Align to VertCenter.
    Error creating thumbnail: Unable to save thumbnail to destination
    Error creating thumbnail: Unable to save thumbnail to destination
  5. In the Structure View, right-click the layout and follow the steps in the images below to copy and paste the layout on the form.
    Error creating thumbnail: Unable to save thumbnail to destinationError creating thumbnail: Unable to save thumbnail to destination
  6. Rotate the second layout by setting the RotationAngle to -60.
    Error creating thumbnail: Unable to save thumbnail to destination
  7. Continue copying and pasting the last modified layout, and change its RotationAngle with a value with 30 grades higher than the previous layout, until you reach a RotationAngle of 90.
    This is the final pattern:
    Error creating thumbnail: Unable to save thumbnail to destination
  8. Run the project by pressing F9. The result should look like this:
    Error creating thumbnail: Unable to save thumbnail to destination
  9. To obtain a different visual effect, go to the Object Inspector, and change the RotationAngle of each label on the form to 90:
    Error creating thumbnail: Unable to save thumbnail to destination

Next

See Also