PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • New Widget
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Adds and displays a widget (internal window or page) in a Dashboard control.
Caution: The widgets added by programming are not automatically displayed. You must use DashInitialConfiguration before the first display of Dashboard control.
Versions 20 and later
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 20
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WEBDEV - Server codeWindows This function is now available in WEBDEV Server.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Versions 22 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
New in version 22
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Example
WINDEVAndroidiPhone/iPad
// Add 2 elements
DashAddWidget(DASH_MyDashboard, IW_Sales, "Sales")
DashAddWidget(DASH_MyDashboard, IW_MonthlyStat, "Monthly statistics for July", "201307")
WINDEVAndroidiPhone/iPad
nSubscript is int

// Adds a widget that expects parameters
nSubscript = DashAddWidget(DASH_Dashboard, IW_Widget_Clock, "Clock " + ...
COMBO_AddWidget[COMBO_AddWidget]..DisplayedValue, ...
COMBO_AddWidget[COMBO_AddWidget]..DisplayedValue)

// Display this widget upon request
IF YesNo(Yes, "Do you want to display this widget?") = Yes THEN
DASH_Dashboard[nSubscript]..Visible = True
ELSE
ToastDisplay("The widget was added to the dashboard as ""hidden""." + ...
"Switch to edit mode to add it.", ...
toastShort, vaMiddle, haCenter)
END
Versions 20 and later
WEBDEV - Server code
WgtSub is int
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Paris", +0)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Honolulu", -12)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Sydney", +9)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
New in version 20
WEBDEV - Server code
WgtSub is int
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Paris", +0)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Honolulu", -12)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Sydney", +9)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
WEBDEV - Server code
WgtSub is int
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Paris", +0)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Honolulu", -12)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
// Adds a widget that expects parameters
WgtSub = DashAddWidget(DASH_TimeZones, IP_Time, "Time" + GetIdentifier(), ...
"Sydney", +9)
DashInitialConfiguration(DASH_TimeZones, WgtSub)
Syntax
<Result> = DashAddWidget(<Dashboard Control>, <Widget>, <Caption> [ , <Parameter 1> [ , <Parameter 2> [ , ... ]]])
<Result>: Integer
Subscript of added element. This subscript can be used to handle the widget.
<Dashboard Control>: Control name
Name of Dashboard control to use.
<Widget>: Character string (with or without quotes)
  • WINDEVAndroidiPhone/iPad Name of the internal window that must be added into the Dashboard control.
  • Versions 20 and later
    WEBDEV - Server codeWEBDEV - Browser code Name of the internal page that must be added into the Dashboard control.
    New in version 20
    WEBDEV - Server codeWEBDEV - Browser code Name of the internal page that must be added into the Dashboard control.
    WEBDEV - Server codeWEBDEV - Browser code Name of the internal page that must be added into the Dashboard control.
<Caption>: Character string (with quotes)
Caption of the Widget. This caption will be displayed in the popup menu of the Dashboard control and it will allow the user to handle the Widget.
<Parameter 1>: Type of value sent to the window or page (optional)
First parameter that must be passed to the "Declaration of global variables" process of the internal window or internal page to open. This parameter is passed by address and it is considered as being a variable global to the internal window or to the internal page.
Caution: Only the simple types are available.
<Parameter 2>: Type of value sent to the window or page (optional)
Second parameter that must be passed to the "Declaration of global variables" process of the internal window or internal page to open. This parameter is passed by address and it is considered as being a variable global to the internal window or to the internal page.
Caution: Only the simple types are available.
Remarks

New Widget

The widget is declared in addition to the widgets defined in the description of Dashboard control.
This widget can be made visible:
  • by using DashInitialConfiguration before the first display.
  • by the end user via the popup menu.
  • by using the following syntax:
    DASH_DashboardName[Subscript]..Visible = True

    where <Subscript> is the Widget number returned by DashAddWidget.
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.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment