ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Dashboard functions
  • Rule used for calculating cells
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Changes the position of a widget found in a Dashboard control. This widget is already configured or displayed.
Reminder: A Widget corresponds to:
  • WINDEV an internal window.
Example
// Déplace le Widget courant en haut du champ Tableau de bord
DashMoveWidget(1, 1)
Syntax

Moving the current widget Hide the details

DashMoveWidget(<X> , <Y> [, <Options>])
<X>: Integer
Horizontal position of current widget in number of cells or in pixels. The first cell is cell [1, 1].
The value in pixels is rounded to correspond to an integer number of cells.
The widget used corresponds to the control to which the current event belongs (Widget or control belonging to the widget).
<Y>: Integer
Vertical position of current widget in number of cells or in pixels. The first cell is cell [1, 1].
The value in pixels is rounded to correspond to an integer number of cells.
The widget used corresponds to the control to which the current event belongs (Widget or control belonging to the widget).
<Options>: Optional Integer constant
Allows you to define the unit used and the reorganization mode:
dashNoReorganizationMoves the widget without reorganizing the adjacent widgets.
Caution: Using the constant tdbSansRéorganisation can lead to incorrect display (with overlaid Widgets). When using this constant, it is important to entirely reorganize the Dashboard control with DashResizeWidget and DashMoveWidget.
dashUnitCell
(Default value)
The unit used when moving the widget is a number of cells.
dashUnitPixelThe unit used when moving the widget is the pixel.

Moving a widget identified by its index Hide the details

DashMoveWidget(<Dashboard control> , <Widget index> , <X> , <Y> [, <Options>])
<Dashboard control>: Control name
Name of the Dashboard control to be used.
<Widget index>: Integer
Index of the widget to use. This index corresponds to:
  • the addition number of the widget defined in the window editor or in the page editor.
  • the addition number of widget returned by DashAddWidget.
<X>: Integer
Horizontal position of widget in number of cells or in pixels. The first cell is cell [1, 1]. The value in pixels is rounded to correspond to an integer number of cells.
<Y>: Integer
Vertical position of widget in number of cells or in pixels. The first cell is cell [1, 1]. The value in pixels is rounded to correspond to an integer number of cells.
<Options>: Optional Integer constant
Allows you to define the unit used and the reorganization mode:
dashNoReorganizationMoves the widget without reorganizing the adjacent widgets.
Caution: Using the constant tdbSansRéorganisation can lead to incorrect display (with overlaid Widgets). When using this constant, it is important to entirely reorganize the Dashboard control with DashResizeWidget and DashMoveWidget.
dashUnitCell
(Default value)
The unit used when moving the widget is a number of cells.
dashUnitPixelThe unit used when moving the widget is the pixel.
Remarks

Rule used for calculating cells

Let's see some examples for a widget whose size is equal to 100 px by 100 px with a margin set to 10 px:
DashMoveWidget(TDB_FuseauxHoraires, 1, 80, 80, dashUnitPixel)
// Le Widget se positionnera dans la case 1 x 1

DashMoveWidget(TDB_FuseauxHoraires, 1, 160, 200, dashUnitPixel)
// Le Widget se positionnera dans la case 2 x 2

DashMoveWidget(TDB_FuseauxHoraires, 1, 211, 211, dashUnitPixel)
// Le Widget se positionnera dans la case 3 x 3

DashMoveWidget(TDB_FuseauxHoraires, 1, 400, 500, dashUnitPixel)
// Le Widget se positionnera dans la case 4 x 5
Component: wd300obj.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help