ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Dashboard functions
  • Deleting the Edit mode for the end user (via the AAF)
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Opens or closes the Dashboard control edit mode.
Example
WINDEV
// Si le champ Tableau de bord est déjà en mode édition, avertit l'utilisateur
IF TDB_TableauDeBord.Mode() <> dashNoModif THEN
	Error("Le tableau de bord est déjà en mode édition")
	RETURN
END
nOption is int
// Définit l'option d'édition
IF INT_OptionsEdition[1] THEN nOption += dashMove
IF INT_OptionsEdition[2] THEN nOption += dashResize
IF INT_OptionsEdition[3] THEN nOption += dashDelete
// Vérifie qu'une option au moins soit cochée
IF nOption = 0 THEN
	Error("Vous devez cocher au moins une option d'édition")
	SetFocusAndReturnToUserInput(INT_OptionsEdition)
END
// Modifie le mode d'édition
TDB_TableauDeBord.Mode(nOption)
WINDEV
// Désactiver la suppression des widgets 
// mais pas leur déplacement ou leur redimensionnement :
TDB_SansNom1.Mode(dashMove + dashResize)
// Attention, pour ne pas afficher du tout la barre d'outils, 
// il faut utiliser la fonction DésactiveFAA (ou FAADesactive) avec la constante faaTdbModeEdition.
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 Widgets in the Dashboard control array.
dashMoveSwitch to edit mode: the user can move Widgets into the Dashboard control array.
dashNoModifEdit mode closed: the user cannot edit Widgets in the Dashboard control array.
This constant cannot be combined with the other constants.
dashResizeSwitch to edit mode: users can resize Widgets in the Dashboard control array.

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

<Result> = <Dashboard control>.Mode()
<Result>: Integer constant
Current edit mode of Dashboard control:
dashDeleteEdit mode: the user can hide Widgets in the Dashboard control array.
dashMoveEdit mode: the user can move Widgets into the Dashboard control array.
dashNoModifClassic mode: the user cannot modify Widgets in the Dashboard control array.
dashResizeEdit mode: users can resize Widgets in the Dashboard control array.
<Dashboard control>: Control name
Name of the Dashboard control to be used.
Remarks

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

<Dashboard>.Mode is used to switch to edit mode programmatically.
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: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help