|
|
|
|
|
- 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
Layouts are used to define several views of a window/page in the same project without duplicating this window/page. This help page presents: 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: - Select the control.
- Right-click to open the context menu.
- 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.
- Add a print layout.
- 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,
- the size of the browser,
- the size of the window or page (in the editor).
The layout changes automatically: - 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.
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|