Read Instructions Here!

Align, distribute, and resize components

From KickApps API Reference

Jump to: navigation, search
Tip:  All of the commands in the Alignment panel can also be executed from the Object menu.
Tip: All of the commands in the Alignment panel can also be executed from the Object menu.

The Alignment panel enables you to align components vertically and horizontally, distribute vertical and horizontal space between them, and match their width and height. By default, the buttons in the Alignment panel are applied relative to the selected components within their selection box. Clicking the To Container button, and then clicking another button in the Alignment panel will apply that button's command to the selected components relative to their container.

Contents

Align, distribute, and resize components relative to each other

  1. Open the Alignment panel by clicking Windows > Alignment.
  2. Select one or more components.
  3. Click a button in the Alignment panel to apply its command to the selected components. See below for illustrations of each command in the Alignment panel.


Align

Horizontal align left

Horizontal align center

Horizontal align right

Vertical align top

Vertical align center

Vertical align bottom

Distribute

The distribute commands position the selected components at equal vertical or horizontal distances from each other.

Distribute horizontally

Distribute vertically


Match Size

Match width

Resizes all selected components to the width of the widest selected component.

Match height

Resizes all selected components to the height of the tallest selected component.

Match width & height

Resizes all selected components to the width and height of the widest and tallest selected components.

Align, distribute, and resize components relative to their container

The widget canvas itself is considered a container, so every component is always within a container, even if you haven't explicitly created a container and put the component within it. All commands on the Alignment panel can be applied relative to the selected components' container, rather than relative to themselves or their selection box.

To apply Alignment commands relative to your selected components' container:

  1. Open the Alignment panel by clicking Windows > Alignment.
  2. Click the To Container button in the Alignment panel.
  3. Select one or more components.
  4. Click a button in the Alignment panel to apply its command to the selected components, relative to their container. See above for illustrations of each command in the Alignment panel.

Example: Match width to container

Toggling the To Container button and then clicking another button in the Alignment panel will apply the command for that button relative to the container of the selected component(s), rather than applying the command relative to their selection box or themselves. For example, with To Container toggled, aligning buttons to the left will position them flush with the left side of their container. In the example below we're re-sizing the width of the selected button to the width of its container, which encompasses the video screen, playbar, and our button.