Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Forms in PhixFlow can be built and laid out using drag and drop functionality. If you are new to form building, please see the introductory course: PhixFlow Training - Building Applications

A more detailed description of drag and drop functionality is given below, but the following videos will introduce you to the basic concepts:

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=GCeiTdv0ty4
height500

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=oXt89u6QGXE
height500

Pinning and unpinning

A key concept behind dragging functionality in forms is pinning and unpinning. Unpinned components are placed into the next available space. Pinned components can be placed anywhere on the form, and you can pin the edges to the edges of the parent component by setting offsets between the top, right, bottom and left edges of the component to those of the parent.

Unpinned components

Unpinned components are placed automatically in the next space available.

Panel
bgColor#e6f0ff
titleBGColor#99c2ff
titleTechnical Breakout: next available space

By default, the next available space will be  underneath the previous component - but this can be controlled in CSS. A full discussion of the CSS options for controlling this are beyond the scope of this article, but can be researched on the web. If you want to do this, note that components in forms are represents as DIV objects. Future versions of PhixFlow will features easy to use options to control which space components will flow into.

For further details about how to position unpinned components within a parent component, see Positioning unpinned components

Pinned components

Pinned components can be dragged to anywhere you want in the form. You can "pin" the edges of the component to its parent component. For further details on how to position pinned components on a form, see Positioning pinned components on forms 

...

In most cases, a component's parent is fairly obvious - and you can find it by clicking just outside the area of the component. In some cases, it is not obvious. Remember also that with pinned components you could drag a component from an area, which is its parent, into another area, so that the component now appears in an area that is not actually its parent.

There are a number of ways of determining a component's parent:

  • Open the form for the component; at the top of the form, the name of the parent will be shown - to get more details, click on the quick link Parent to open the form for the parent
  • Right-click on the component in the form and select Find in Explorer - this gives you a useful way of visually seeing what the parent is, and indeed how other components on the form relate to this component

Dropping components onto forms to create content

New layout components can be added to a form by dragging and dropping any of the following:

...

A template from a palette or from the repository browser

...

When you drag an unpinned component onto a form, it will be automatically assigned to the parent you drop it into (for example, an area), and it will be dropped in the position that you drop it. So if you drop it in the middle of a set of fields inside an area, the fields underneath will be shuffled down to make space for it.

Panel
bgColor#e6f0ff
titleBGColor#99c2ff
titleTechnical Breakout: default component palette

When you drag objects onto a form, they will be created using the default template for that object. This is apart from when you choose a template from a palette or the repository browser.

So it is important to make sure that you have the right default component palette. This is set in System Configuration.

To drop an item onto a form that would normally be created unpinned (see table above) as pinned - hold the Ctrl key down while dragging.

Laying out forms

...

You can drag unpinned components around in their parent component, and they will placed wherever you drop them.

You can move unpinned components around by dragging them. You can also manually control the order of unpinned components by editing the Order field in the form for the component. This is found in the Positional Settings section of the form. The video about gives an example of using both of these methods.

...

You can drag pinned components to an position on a form.

You can "pin" the edges of the component to its parent component using the Positional Settings in the component's form. These specify the offsets, in numbers of pixels, between the edge of the component and the edge of the parent. An example of pinning the a component to its parent in this way is given in the video above.

Note that if you set the right Positional Settings, this overrides any width set for the component. Similarly, if you set the bottom Positional Settings, this overrides any height set.

Mixing pinned and unpinned components

Pinned components can be dragged over unpinned components, so be careful when mixing pinned and unpinned components on a form, This of these as being laid out in two separate, overlapping layers on the form.

Switching between unpinned and pinned

To change an unpinned component to a pinned, press the Ctrl key down and drag it.

To unpin a pinned component, right-click on it and select Unpin Selected Objects. You can select several components at once, and unpin them all using this option. The components will move into the next available space in their respective parent components.

Moving a component to a new parent

To move a component to a new parent, press Shift and drag it to the new parent. Commonly this is used to move components inside an area to a new area.

To confirm that the component has used to the new parent, remember the techniques to confirm the parent of a component: Find a component's parent

Preventing components from being dragged

...

Insert excerpt
_Banners
_Banners
namescreen
nopaneltrue

Overview

To divide a screen into multiple sections:

Anchor
palette
palette

Divide a Screen Using a Palette Layout

Some palettes have layouts that have 2 areas contained by a split-view area. For example:

  • Serene Grey - Basic Components → Area Split Image Added

These can be used to divide your screen into separate areas while also providing a splitter which allows designers and users to resize the areas.

Setup

  1. In the screen canvas toolbar, click
    Insert excerpt
    _palette
    _palette
    nopaneltrue
    .
  2. Expand a palette to find a layout that has 2 areas.
  3. Drag the layout from the palette onto an existing area.
  4. PhixFlow creates a layout with the following structure, this example is horizontal but vertical options are also available. 
  5. Image AddedIf you have existing content on your screen this can be dragged into the appropriate area using the repository or layout section. Remember you will need to hold the shift key to drop content inside these areas.

Divide a Screen Using the "Add Area" Options
Anchor
element
element

  1. Right-click a screen.
  2. Click Screen Options.
  3. Use one of the Add Area... options to add a new area for the screen, separated by a dividing line.
    PhixFlow creates a new element in the form of a pane for this part of the screen.
  4. This new element is similar to a black screen and will require a suitable container, such as an area, form or card container in order for you to display content. 
    It may be easier to add one of the complete screens to the new element and remove the items you do not require.

Resizing

To resize a pane, drag its dividing line. This automatically resizes adjacent panes.

To prevent resizing, right-click to display the popup menu and select:

  • Insert excerpt
    _area_lock_width
    _area_lock_width
    nopaneltrue
  • Insert excerpt
    _area_lock_height
    _area_lock_height
    nopaneltrue

Removing a Pane

First, delete any layouts or components in it.

  1. Right-click on the empty pane to display the popup menu.
  2. Select 
    Insert excerpt
    _delete_item
    _delete_item
    nopaneltrue
     Pane
    Anchor
    add-area
    add-area

Learn More