Introduction
To add content to a screen we need the palette and screen itself to be
Insert excerpt |
---|
| _unlock |
---|
| _unlock |
---|
nopanel | true |
---|
|
ed.
- ed - the content can be interacted with, such as a button click will trigger the button's action.
Insert excerpt |
---|
| _unlock |
---|
| _unlock |
---|
nopanel | true |
---|
|
ed - the content can be edited, such as clicking a button will open its properties.
Locking and Unlocking a screen
The screen is unlocked if you can see the context toolbar for the screen.
- To interact with the screen, the screen using the Context Toolbar option.
- To unlock the screen for editing, right-click anywhere on the screen to open the popup menu and select
Insert excerpt |
---|
| _unlock |
---|
| _unlock |
---|
nopanel | true |
---|
|
. - PhixFlow displays the toolbar for the screen so that you can begin to make changes.
Palette
- To view the palette, click
Insert excerpt |
---|
| _palette |
---|
| _palette |
---|
nopanel | true |
---|
|
from the context toolbar and the palette displays on the right.
Adding Content
In this chapter, we will create the following screen.
Adding a Grid
We can drag a table directly onto a screen to display it.
- From the toolbar, click
Insert excerpt |
---|
| _tableOnly |
---|
| _tableOnly |
---|
nopanel | true |
---|
|
s. - The list of available tables will appear in the Repository.
- Drag the Companies table onto the screen canvas.
- You will be asked how you want to display the data, select Grid.
- The Available Attributes selector appears and we can select the attributes we wish to display, this will include the attributes from the table and those from related tables.
- Select all the attributes from the Current Table and drag them onto the grid.
- Close the Available Attributes selector.
- Column widths can be set by dragging the header to the desired width.
- If you want a specific size, click the column header.
- In the properties that open, navigate to Grid Settings → Grid Default Width (pixels) and enter a specific value.
- In PhixFlow version 11.1 onwards, Grid Settings can be found on the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
- Click on the Company Name column header.
- Set Grid Settings → Grid Default Width (pixels) to be,
200
. - In the Label section we of the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
we will change the value displayed in the column header to be, Name
. - Click .
- Take some time to space out the columns as required.
- Once you are happy with your column layout you can test it in App Mode to see exactly how it will appear to users.
- Click
Insert excerpt |
---|
| _app_mode |
---|
| _app_mode |
---|
nopanel | true |
---|
|
in the top right corner of the screen to switch the application into App Mode. - To switch back to designing your application, click
Insert excerpt |
---|
| _design_mode |
---|
| _design_mode |
---|
nopanel | true |
---|
|
in the top right-hand corner.
- Click on the header, Header 1 Dynamic.
- In its Properties that open on the right, change the text in the Default Value box to be
Companies Data
. - Click .
Tip |
---|
In the event that you do not see the change appear on your screen, close and reopen the screen. |
Add Items from the Palette
- We will now add an additional Tile.
- Open your palette if it is not showing.
- Navigate to the Tiles section
- Drag Blank-Column onto your screen.
- Notice the centre of the screen highlights, this is because the body of your screen is the preferred parent of a Tile. Which means the tile is designed to be placed here.
- Name the tile
Additional Info
.
Tip |
---|
There are lots of tiles available, each designed to satisfy a specific need or act as a foundation for your design. Hover your mouse over any of the tiles or components in the palette to see a full description. |
Check Point
At this point your screen should look like this:
Add a Card Container
Anchor |
---|
| AddCardContainer |
---|
| AddCardContainer |
---|
|
We will add a card container that will display the employees for the selected company.
- In the palette expand the Card Containers section.
- Drag Contacts onto the tile Additional Info.
- Name,
Employees
.
- We now have a card container that is designed to hold contact information. We will use this to display employee information.
- Click on the Employees card container to open its Properties
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
on the right.- Or click on the Employees card container in the Layers section on the left.
- We need to tell the card container where to get its information from. In the Propertiesthe
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
, under Basic Settings, click Insert excerpt |
---|
| _tableOnly |
---|
| _tableOnly |
---|
nopanel | true |
---|
|
, next to the Table drop down box. - Drag the Employees table from the Repository into the Table box within the Employee Card Component's Basic Settings.
- This sets the Employees as the table backing the card container and will allow us to display the data.
- Click .
tip
With Employees as the backing table, PhixFlow will automatically associate any table attributes to form fields or dynamic text fields with the same name. For example, there is a dynamic text field called Role on the Employees card container, this matches the attribute Role on the Employees table, therefore the Role data is displayed in the dynamic text- .
d. - When working in Design Mode, the card container will only display one card containing the data from the first record it receives from the backing table. When we switch to
Insert excerpt |
---|
| _app_mode |
---|
| _app_mode |
---|
nopanel | true |
---|
|
or , all the data we have chosen will be displayed.
7. To display the data on the Employees table, either:
a. Change the names of the form fields and dynamic text fields to match the attribute name on the Employees table.
b. Or, tell PhixFlow which attributes to associate with them using the Add Backing Attribute option.
8. Here we will use the latter:
a. Click Right-click on First Name to highlight it, then right-click and and select Add Backing Attribute.
b. In the Available Attributes selector that opens, tick first_name
.
c. Click the Add button.
i. The form field will now display this data in the first_name attribute on the screen.
d. We will repeat these steps but this time set the Last Name field to be the last_name attribute on the Employees table.
9. We will return to this card container later and add additional content.
Add a Splitter
We will now add a splitter. This will allow us to separate a tile into two separate sections.
- In the palette, open the Basic Layouts section.
- Drag the Area - Split H onto the tile Additional Info.
- Name it
Splitter
.- This will most likely have moved the card container. What we will do now is move the card container into the top part of the splitter.
- In the Layers section on the left:
- Expand Splitter.
- Find the Employees card container. Click on it and hold the shift key, and now drag it onto Split Area Top.
- The card container will now appear in the top area. Dragging + Shift key moves items out of or into a different container. Dragging without the shift key moves the items within a container.
- We will now add a map to the Splitter Area Bottom.
- From the palette → Maps section, drag the Map over the bottom area of Splitter.
- Name it
Map
.- This is a generic map, instructions are provided in the expression for the component on how to set this to dynamically update or see the article: How-to Create a Google Map
- The map will display when we switch to
Insert excerpt |
---|
| _app_mode |
---|
| _app_mode |
---|
nopanel | true |
---|
|
or the screen.
Moving Components
To find out more about moving components see Moving Components Content on a Screen.
Check Point
Switch to
Insert excerpt |
---|
| _app_mode |
---|
| _app_mode |
---|
nopanel | true |
---|
|
or
the screen and it should look like the image below:
Tile Formatting
We will now look at formatting the tiles. By default tiles have Auto Size enabledhave Fit to available space enabled, which means that the tiles will consume the space available to them on the screen and tile content will be made to fit the tile e.g. if the content is too big to display in the tile a scrollbar will be provided. When we remove Auto Size Fit to available space, the tiles will be sized to fit their content. So to reiterate:
- Auto Size tickedFit to available space ticked: Consumes the available space.
- Auto Size untickedFit to available space unticked: Content will determine the size.
Grow Factor Example
Auto Size is Fit to available space is useful for laying out screen content, but sometimes we want one area to be larger than another. Here we can use the grow factor.
- In the Layers on the left of the screen, click on Tile in Tile Container.
- In the properties on the right click on the Styles tab. All style settings including sizing are in here.
- Scroll down to Grow Factor.
- The
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
will open on the right, which contains all style settings, including sizing. - Set Grow Factor to 2 - This will make it larger than the other tile.
- The growth factor determines the proportionate size of this tile in comparison to the other tiles it shares its space with and the space available.
- Set this to be 2. This will make it larger than the other tile.
- Switch to
Insert excerpt |
---|
| _app_mode |
---|
| _app_mode |
---|
nopanel | true |
---|
|
to see the change.
Specific Size Example
We will now specify a specific size rather than a proportion and use Auto Size to use Fit to available space to make sure the remaining tile automatically consumes the remaining space.
- Switch back to mode and
_mode | | _design_mode |
---|
nopanel | true |
---|
|
and remove the growth factor added above. - Click .
- On your screen, click on the Additional Info tile to open its properties.
- Click on the Styles tab.
- Scroll down to Auto Size, and untick this.
- Scroll up to Width and set this to its
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
on the right. - Untick Fit to available space.
- Set Width to
350px.
- We can also specify sizes as a percentage, for example 33%.
When we specify a size, typically this is what is seen on a screen. However, it should be noted that if there is insufficient space to show all the content on the screen components, including tiles, will shrink down to a minimum size, denoted in the CSS property min-size. It is often a good idea to specify a minimum and maximum size to ensure your design appears as you expect. For example, when viewing on a mobile device or very large monitor.