17. HOW TO CREATE A SWIPE-VIEW

A swipe view consists of several frames that the user can swipe between. The program code can determine which frame to show on the left or right swipe. By default, the display will show the first frame in the view list. The order that you add the frames to the view list, determines the swipe order.
Each frame has a “Show” property when you add it to the view list. If you haven’t ticked the actual logged-in user’s rights in the frames list, the swipe will skip this frame and jump to the next visible frame.

For control components

Step 1:

Create a “basic view” based on PD_11813 – Comp_view that has the size you want and that contains the elements you want on all views. Examples are headers and buttons, but do not bother with the forward or back arrow – they will come automatically.

Step 2:

Build each individual frame for the swipe using your “basic view” as your template.

Step 3:

Build your swipe by using this view as your base:  PD_15398 Basic_swipe_view_for_component. Afterward, place all the individual frames in the view list of this view. Remember to set the size of this view to the same size as you selected for your “basic view”.

For assemblies

Same as control components, but create a “basic view” based on PD_13556 – Asm_view and build your swipe by using this view as your base: PD_15452 Basic_swipe_for_assembly.

The first two elements in the view list for the PD_15398 and PD_15452 are buttons to swipe left or right and they work automatically. The first frame in the view list will be shown first, and then the second.

FYI:
Process components have a predefined set of frames with pre-programmed “swipe-logic”. They are based on “PD_15399-17 – Swipe_View_for_Process_component_100_x_75”.

See tutorial 7 for examples of how they work.

Process assemblies (as e.g. valve or pump) have special swipe-control which gives an “assembly process component” the same swipe-logic as a process component.
They are based on “PD_15453-15 – Process_swipe_for_assembly”.