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
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Restores the configuration of a Dashboard control. This configuration includes the following elements:
  • position of internal windows or pages in the Dashboard control.
  • size of internal windows or pages in the Dashboard control.
  • visibility of internal windows or pages in the Dashboard control.
Note: To save or restore the user configuration automatically, check the "Remember configuration of Widgets" option in the "Detail" tab of the control description window.
Example
WINDEV
// Demande à l'utilisateur la configuration qu'il souhaite charger
sFichier is string

// Ouvre le sélecteur de fichiers
sFichier = fSelect("", "", "Sélectionnez un fichier de configuration...",...
			"Configuration de tableau de bord" + TAB + "*.tdbconf", "*.tdbconf")
// Si un fichier est sélectionné
IF sFichier <> "" THEN
	// Récupère la configuration contenue dans le fichier
	sConfiguration is string = fLoadText(sFichier)
	// Charge la configuration
	IF DashLoadConfiguration(TDB_TableauDeBord, sConfiguration) THEN
		ToastDisplay("La configuration a été chargée", toastShort, vaMiddle, haCenter)
	ELSE
		Error("Erreur en chargement de configuration", ErrorInfo())
	END
END
WEBDEV - Server code
// Récupération d'un fichier précédemment sauvé
IF fFileExist(fWebDir() + ["\"] + "ConfigTDB.tdb") THEN
	sMaConfig = fLoadText(fWebDir() + ["\"] + "ConfigTDB.tdb")
	DashLoadConfiguration(TDB_FuseauxHoraires, sMaConfig)
END
AndroidiPhone/iPadMac Catalyst
// Récupération d'un fichier précédemment sauvé
IF fFileExist(fCurrentDir() + ["\"] + "ConfigTDB.tdb") THEN
	sMaConfig = fLoadText(fCurrentDir() + ["\"] + "ConfigTDB.tdb")
	DashLoadConfiguration(TDB_FuseauxHoraires, sMaConfig)
END
Syntax
<Result> = DashLoadConfiguration(<Dashboard control> , <Configuration>)
<Result>: Boolean
  • True if the configuration was loaded.
  • False otherwise. To get more details on the error, use ErrorInfo.
<Dashboard control>: Control name
Name of the Dashboard control to be used.
<Configuration>: Character string
Configuration to restore. This configuration is the result of DashSaveConfiguration.
Caution: If the format of this parameter is invalid or cannot be applied to the Dashboard field (for example, because the internal windows/pages or the number of columns do not match), <Result> is False.
Remarks
The widgets declared visible since the last backup must be visible when loading the configuration.
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 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help