ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Layout control
  • Overview
  • Defining visibility programmatically
  • Hiding a control dynamically
  • Hiding a cell in a Layout control dynamically
  • Programming the Layout control
  • Available properties
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Manipulating Layout controls programmatically
Overview
Layout controls can be manipulated programmatically. The following elements can also be manipulated programmatically:
  • controls in the Layout control,
  • cells in the Layout control.
This help page presents the different options available.
Defining visibility programmatically

Hiding a control dynamically

To dynamically make a field present in a Layout control visible or invisible, simply use the Visible property using the following syntax:
<Control name>.Visible = <True/False>

Note: Operation of a Layout control in "push fields around" mode :
The cell in the Layout control is automatically hidden and the other cells are automatically repositioned if the following conditions are met:
  • a control within a Layout control is invisible,
  • this control is the only one in a cell or all the controls in the cell of the Layout control are invisible.
Remarks:
  • If all the controls within a Layout control are invisible, the Layout control remains visible.
  • WEBDEV - Server codeWEBDEV - Browser code The Visible property can be used in server or browser code. The property has the same effect on controls and cells in a Layout control.
  • WINDEVAndroidiPhone/iPad The VisibleWithAnimation property shows or hides a Layout control with an animation.

Hiding a cell in a Layout control dynamically

To dynamically make a cell in a Layout control visible or invisible, simply use the Visible property on the cell using the following syntax:
<Control name>[Cell index].Visible = <True/False>

Note: Operation of a Layout control in "push fields around" mode :
If a cell in a Layout control is made invisible, all the fields in the cell are automatically made invisible: the other cells in the Layout control are automatically repositioned..
Remarks:
  • If all the cells in a Layout control are hidden, the Layout control is also hidden.
  • WEBDEV - Server codeWEBDEV - Browser code The Visible property can be used in server or browser code. The property has the same effect on controls and cells in a Layout control.
  • WINDEVAndroidiPhone/iPad The VisibleWithAnimation property shows or hides the cells of a Layout control with an animation.
Programming the Layout control

Available properties

The following properties are specific to the Layout control:
HeightWithAnimationThe HeightWithAnimation property is used to modify the height of a cell of a Layout control with the "Resize cell" animation defined:
  • in the "Advanced" tab of the project description window ("Control animation" button).
  • in the "Style" tab of the control or project.
LayoutThe Layout property is used to get the layout of the cells in a Layout control.
MarginInterCellThe MarginInterCell property is used to:
  • find out the margin between rows or columns in a Layout control.
  • modify the margin between rows or columns in a Layout control.
VisibleWithAnimationThe VisibleWithAnimation property is used to make a control visible or invisible via the "Appear/Disappear" animation.
WidthWithAnimationThe WidthWithAnimation property is used to modify the width of a cell of a Layout control with the "Resize cell" animation defined:
  • in the "Advanced" tab of the project description window ("Control animation" button).
  • in the "Style" tab of the control or project.
For a complete list of WLanguage properties that can be used with Layout controls, see Layout control properties.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help