ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Flexbox control
  • Overview
  • How to?
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
Flexbox example: ratios to distribute available space among controls
Overview
In a flexbox container, you can define ratios for the different controls so that they take up a given amount of space.
With the Flexbox control, you can set a ratio for each control. This ratio will be applied as the page is enlarged.
In the following example, there are 4 input areas (Edit controls) inside a Looper control.
When the browser is enlarged horizontally, the first 2 input areas must remain at a fixed width and the extra space must be distributed as follows: 20 % for the third area (Full name), 80 % for the fourth area (Description). 
These anchors can be defined with a Flexbox control.
Remark: This page is based on the "WW_Flexbox" example.
How to?
To set specific anchors on the input areas inside the Looper control, you can:
  1. Create a Flexbox control. This Flexbox control should be inside a row of the Looper control and contain the different Edit controls. In our example, there are 4 Edit controls.
  2. The different controls are listed in the "General" tab of the Flexbox control description. To get the desired resize behavior, simply specify a flex-grow value for the third and fourth controls. In this case, there are four Edit controls. The following options must be modified:
    • set the flex-grow value of the third Edit control to 20.
    • set the flex-grow value of the fourth Edit control to 80.
  3. No changes are required in the "Details" tab.
Related Examples:
WW_Flexbox Training (WEBDEV): WW_Flexbox
[ + ] This example presents the Flexbox control, which determines the positioning of the controls it contains.
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 06/30/2023

Send a report | Local help