ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Dashboard functions
  • Disabling options and bar of the edit mode
  • Deleting the Edit mode for the end user (via the AAF)
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
Opens or closes the Dashboard control edit mode.
Example
WINDEVAndroid
// Informs the user if the Dashboard control is already in edit mode
IF DASH_Dashboard.Mode() <> dashNoModif THEN
Error("The dashboard is in edit mode already")
RETURN
END
nOption is int
// Defines the edit option
IF CBOX_EditOptions[1] THEN nOption += dashMove
IF CBOX_EditOptions[2] THEN nOption += dashResize
IF CBOX_EditOptions[3] THEN nOption += dashDelete
// Checks that at least one option is checked
IF nOption = 0 THEN
Error("At least one edit option must be checked")
SetFocusAndReturnToUserInput(CBOX_EditOptions)
END
// Modifies the edit mode
DASH_Dashboard.Mode(nOption)
WINDEVAndroid
// Disable the deletion of widgets
// but not their move or resizing:
DASH_NoName1.Mode(dashMove + dashResize)
// Caution, to avoid displaying the toolbar,
// you must use DissableAAF (or AAFDisable) with the constant aafDashEditTdbMode.
Syntax

Changing the mode of the Dashboard control Hide the details

<Dashboard control>.Mode(<Mode>)
<Dashboard control>: Control name
Name of the Dashboard control to be used.
<Mode>: Integer constant (or combination of constants)
Edit options available for the user:
dashDeleteSwitch to edit mode: the user can hide the widgets in the Dashboard control.
dashMoveSwitch to edit mode: the user can move the widgets in the Dashboard control.
dashNoModifClose the edit mode: the user cannot modify the widgets in the Dashboard control.
This constant cannot be combined with the other constants.
dashResizeSwitch to edit mode: the user can resize the widgets in the Dashboard control.

Finding out the current mode of the Dashboard control Hide the details

<Result> = <Dashboard control>.Mode()
<Result>: Integer constant
Current edit mode of the Dashboard control:
dashDeleteEdit mode: the user can hide the widgets in the Dashboard control.
dashMoveEdit mode: the user can move the widgets in the Dashboard control.
dashNoModifStandard mode: the user cannot modify the widgets in the Dashboard control.
dashResizeEdit mode: the user can resize the widgets in the Dashboard control.
<Dashboard control>: Control name
Name of the Dashboard control to be used.
Remarks
AndroidiPhone/iPadMac Catalyst

Disabling options and bar of the edit mode

<Dashboard>.Mode is used to disable some features of the Dashboard control. Deleting these features can make changes to the bar of the edit mode. Thus, if it is no longer possible to remove widgets, the bin button is not displayed in the toolbar.
Remark: To entirely disable the toolbar display on the Dashboard control, use AAFDisable associated with the aafDashEditMode constant.

Deleting the Edit mode for the end user (via the AAF)

<Dashboard>.Mode is used to switch to edit mode through programming.
To prevent the user from switching to edit mode (via the context menu or with a long click), use AAFDisable with the aafDashEditMode constant.
Related Examples:
WD Dashboard Training (WINDEV): WD Dashboard
[ + ] The "WD Dashboard" example is an educational example for using the Dashboard control.
This example explains how to:
- handle the control in "edit" mode,
- save/load a configuration,
- configure the control (initial configuration, addition/deletion of widgets, ...),
- refresh a widget,
- etc.
WW_Dashboard Training (WEBDEV): WW_Dashboard
[ + ] The "WD Dashboard" example is an educational example for using the Dashboard control.
This example explains how to:
- handle the control in "edit" mode,
- save/load a configuration,
- configure the control (initial configuration, addition/deletion of widgets, ...),
- refresh a widget.
Component: wd290obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/26/2023

Send a report | Local help