ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Editors / Window editor and page editor / Window editor
  • Overview
  • Implementation
  • Creating a new layout for a page
  • Creating a new layout to print a page
  • Handling layouts
  • Managing controls in the layouts
  • Characteristics of layouts
  • Comparing windows or pages with layouts
  • Managing layouts at runtime
  • Default operating mode
  • Special case: Print layout
  • Programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Layouts are used to define several views of a window/page in the same project without duplicating this window/page.
WEBDEV - Server code WEBDEV offers several solutions to create mobile-friendly sites: Responsive Web Design (or RWD), Dynamic serving and layouts.
In a WEBDEV site, you can define:
  • a specific view for Desktop mode,
  • a specific view for mobile mode, etc
  • a specific view for printing the content of a page.
At runtime, you can:
Layouts are another way to make a mobile-friendly site. Unlike Responsive Web Design (RWD) mode, layouts have no constraints on the order of controls.
Thus, layouts allow you to:
  • make designs that cannot be easily made in RWD.
  • effortlessly create elements in one layout and hide them in another layout.
This help page presents:
Implementation
WEBDEV - Server code

Creating a new layout for a page

To create a new layout for a page:
  1. Open the relevant page in the editor.
  2. On the "Page" tab, in the "Layouts" group, expand "Layouts" and select "Add layout from active view".
  3. The layout creation window appears:
  4. Specify the type of screen for which the layout must be created. You can also specify the minimum width of the screen.
  5. Validate.
  6. On the right, the editor displays the different layouts available for the page. Double-clicking the badge of the desired layout allows you to open it in the editor and modify it.
Remarks
Layouts are not available:
  • on pages in Responsive Web Design mode.
  • on internal pages.
  • on page templates.
WEBDEV - Server code

Creating a new layout to print a page

To create a new layout for printing the content of a page:
  1. Open the relevant page in the editor.
  2. On the "Page" tab, in the "Layouts" group, expand "Layouts" and select "Add a print layout".
  3. A "Print" layout is automatically created. On the right, the editor displays the different layouts available for the page. You can double-click the "Print" layout to open it and modify it in the editor.
    This makes it possible to keep only the controls needed for printing in this layout.
Remarks
  • Layouts are not available on internal pages, page templates or pages in Responsive Web Design mode.
  • The print layout will be automatically used when the user prints the corresponding page. For example, unnecessary controls (buttons, links, etc.) can be hidden in the print layout.
Handling layouts

Managing controls in the layouts

By default:
  • A control created in a layout is created in all the layouts.
  • A control is positioned at the same location in all the layouts. It includes the same width and height properties.
  • A control moved in a layout is moved in all layouts.
In order for a control to have specific properties and position according to the layouts, it must be dissociated. Several options are available.
To handle a control in an independent way in the different layouts:
  1. Select the control.
  2. Right-click to open the context menu.
  3. In the "Layouts" menu, the different possibilities are displayed::
    • Dissociate the position: used to modify the control position in one or more layouts.
    • Dissociate the size: used to modify the control size in one or more layouts.
    • Dissociate the anchor: used to dissociate the anchor in one or more layouts.
    • Dissociate the font: used to dissociate the font in one or more layouts. You can for example use a specific font for Android and another font for iOS. It is also possible to specify a font size for each layout.
    • Hide in this layout: hides the control in one or more layouts.
    • Show in all layouts: shows the control in all layouts.
Remarks:
  • This context menu is available for a selection of controls.
  • "Automatic dissociation" option ():
    • If the "Automatic dissociation" option in the title bar of the current layout is enabled, the size and/or position of the controls will be dissociated when the first change is made (via the mouse or the keyboard).
    • If the "Automatic dissociation" option in the title bar of the current layout is disabled, all changes made to the controls (size or position) will be be applied in all the layouts.
    A toast is displayed to remind the user of the effects of this dissociation (the control is moved in all layouts or only in the current layout).
Limit: For the Chart controls, the properties of the title and the properties of the legend cannot be dissociated between several layouts.

Characteristics of layouts

The context menu of thumbnails for the available layouts allows you to manage the layouts:
You can:
  • View the layout description and modify it. For more details, see Layout settings.
  • Activate the layout, which means display it in order to modify it.
  • Activate the layout in double-view mode: the two layouts can be displayed and modified in parallel.
  • Create a new layout from the current layout.
  • WEBDEV - Server code Add a print layout.
  • WEBDEV - Server code Disable the layout. A red "X" appears in the layout icon and the layout cannot be used in execution. However, it will still be available in the editor.
    Remark: This option can be useful when a page inherits one or more page templates with layouts. This allows you to keep only the desired layouts.
  • Delete the selected layout.
  • Display proportional thumbnails.
  • Refresh automatically: Used to refresh the layout as soon as a modification is performed in the window.
  • Refresh this layout: Used to immediately refresh the layout.
  • Refresh all: Used to immediately refresh all the layouts.

Comparing windows or pages with layouts

WINDEV Mobile allows you to compare two projects, two project elements, ... For more details, see Project comparator.
When comparing windows containing layouts, the differences found for each layout are listed.
Managing layouts at runtime

Default operating mode

The initial layout is automatically selected according to:
  • the system,
  • the orientation,
  • the platform size,
  • WEBDEV - Server code the size of the browser,
  • the size of the window or page (in the editor).
The layout changes automatically:
  • WEBDEV - Server code according to the size of the browser.
The layout parameters can be defined ("Description" in the context menu of the layout title bar):

    Special case: Print layout

    If a "Print" layout has been created on a page, this layout will automatically be used when the user selects the "Print" option in the context menu of the browser (or presses Ctrl + P). In this case, only the controls shown in the layout will be printed.

    Programming

    You can:
    Related Examples:
    WW_Layouts Training (WEBDEV): WW_Layouts
    [ + ] This example contains a website that can be displayed on mobile devices.
    The website uses WEBDEV layouts to adapt its UI.
    Minimum version required
    • Version 19
    This page is also available for…
    Comments
    Click [Add] to post a comment

    Last update: 09/30/2024

    Send a report | Local help