My FNZ Studio Version

Screen-Driven Model

Latest Update: 21.09.2020 | Margherita Taffarel
Documentation
2024
2023
2022.2
2022.1
11
10
9
8

1 Introduction

The Layout Container is a container component which allows you to layout content in your screen in a flexible way. It differs from a Div component in its ability to organize content with a set of useful properties for positioning and alignment.
Unlike other specialized layout components such as the Border Layout Manager or the Adaptive Flow Layout, which are meant to be used for very specific layout structures, the Layout Container allows you to achieve most of the desired layouts, from very simple to complex, as they can be nested one inside the other as it feels appropriate to the developer.

2 Creating a Layout Container

Simply drag the Layout Container within your screen and insert the components that need layouting inside it. Tweak the different properties to achieve the desired positioning of the elements.
LayoutContainer_example_revised.png
Figure 1: Layout Container example

3 Layout Container Configuration

You can define the Layout Container settings from the Properties and Layout tabs:

  • HTML Id – Sets the HTML Id of the component.
  • Children direction
    2.jpg
    Establishes the direction of the direct children components.
  • Vertical alignment
    4.jpg5.jpg
    Sets the vertical alignment for the direct children components.
    The first list of options is shown when the direction is set to vertical.
    The second list of options is shown when the direction is set to horizontal.
  • Horizontal alignment
    6.jpg7.jpg
    Sets the horizontal alignment for the direct children components.
    The first list of options is shown when the direction is set to vertical.
    The second list of options is shown when the direction is set to horizontal.
  • Grow to the remaining available space
    8.jpg
    The element grows to occupy all of the parent Layout Container’s space after it has been distributed appropriately to its siblings.
  • Wrap Elements – When you have a horizontal Layout Container containing a series of components, you can decide whether you want to allow them to wrap in case they do not fit their container.
  • Width – The width of the Layout Container.
  • Minimum width – The minimum width of the Layout Container.
  • Maximum width – The maximum width of the Layout Container.
  • Height – The height of the Layout Container.
  • Minimum height – The minimum height of the Layout Container.
  • Maximum height – The maximum height of the Layout Container.

The following sections provide more information on some of the properties mentioned above:

3.1 Children direction

  • Horizontal
    1.png
    Positions elements one next to each other. When they do not fit, they wrap to a new line.
  • Vertical
    2.png
    Positions elements one below the other.

3.2 Alignment for horizontal direction

If you have set the children direction to Horizontal, the following settings apply:

3.2 1 Vertical

  • Top
    11.png
    Positions the direct children to the top.
  • Middle
    22.png
    Positions the direct children to the middle.
  • Bottom
    33.png
    Positions the direct children to the bottom.
  • Stretch
    44.png
    Stretches the direct children to the full height of the container.
  • Baseline
    55.png
    Positions the direct children to the baseline.

3.2.2 Horizontal

  • Left
    111.png
    Positions the direct children to the left.
  • Center
    222.png
    Positions the direct children to the center.
  • Right
    333.png
    Positions the direct children to the right.
  • Space between
    444.png
    Distributes elements horizontally with equal spacing between them.

3.2.3 Wrap Elements

When you have a horizontal Layout Container containing a series of components, you can decide whether you want to allow them to wrap in case they do not fit their container:

WrapElements.png

  • Do Not Wrap: All the components contained in the Layout Container stay side by side in all cases. When the components reach their minimum size, a scrollbar is displayed. For example, if you have an Image, a Button, and a Paragraph containing some long text, the text is not wrapped at the bottom.
  • Wrap: The components contained in the Layout Container do not need to be on the same line. For example, if you have an Image, a Button, and a Paragraph containing some long text, the text is wrapped at the bottom.

3.3 Alignment for vertical direction

If you have set the children direction to Vertical, the following settings apply:

3.3.1 Vertical

  • Top
    1.png
    Positions the direct children to the top.
  • Middle
    2.png
    Positions the direct children to the middle.
  • Bottom
    3.png
    Positions the direct children to the bottom.
  • Space Between
    4.png
    Distributes elements vertically with equal spacing between them.

3.3.2 Horizontal

  • Left
    5.png
    Positions the direct children to the left.
  • Center
    6.png
    Positions the direct children to the center.
  • Right
    7.png
    Positions the direct children to the right.
  • Space between
    8.png
    Stretches the direct children to the full width of the container.

3.3.3 Grow to the remaining available space

  • Not Set
    9.png
    Nothing happens.
  • Grow
    10.png
    The element grows to occupy all of the parent Layout Container’s space after it has been distributed appropriately to its siblings.

3.4 Example 1: Centering Layout Container elements one below the other

The following procedure describes how we can position components one below the other and centering them.
Follow these steps:

  1. In a screen, drag in a Layout Container.
  2. Make sure the direction is set to Vertical.
  3. Inside the Layout Container drag in two components, i.e. a Button and a Text.
  4. Set the horizontal alignment to Center.
  5. Preview the screen. You will have achieved a button on top and a text below, horizontally centered with one another.

3.5 Example 2: Positioning Layout Container elements side by side with a space between them

The following procedure describes how we can position components side by side and how we can set them to have a space between them.
Follow these steps:

  1. In a screen, drag in a Layout Container.
  2. Set the direction to Horizontal.
  3. Inside the Layout Container drag in two components, i.e. a Button and a Text.
  4. Set the horizontal alignment to Space Between.
  5. Preview the screen. You will have achieved a button on the far left of the Layout Container and a text on the far right.

4 Layout Container Style Business Object

You can define the Style Business Object the Layout Container uses on the Style tab.

4.1 States

The Layout Container Style Business Object only displays the Default state.

4.2 Styling Properties

  • Background: sets the background color for the container.
  • Border: sets the color, thickness and type of line (dotted, dashed, and so on) for the container. It also sets border roundings. See also the Property Connectors section.
  • Shadow: sets the color, type and blur effect of the shadow applied to the container.
  • Cursor: sets the style of the cursor (text, pointer, and so on) displayed when you hover over the container.
  • Size: sets both the width and height of the container.
    • Width/Height: You can set bot a minimum and maximum width and height for the container, which grows or shrinks dynamically with the screen. In this case, the Fixed option is usually not set by default.
  • InnerSpacing: defines the space between the element inside the container itself and the border.
  • OuterSpacing: defines the space between the element outside the container itself and the border.

For more information on styling properties, see the Style Business Object: Styling Properties section.

5 Layout Container Actions

Some actions available on the Actions tab are specific to Layout components such as the Layout Container:

A full overview of all actions is available in the article on Events and Actions.

6 Related Links

© 2026 Appway AG. All Rights Reserved