AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Cuadro de mando
  • New widget
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds and displays a widget (internal window or page) in a Dashboard control.
Caution: Widgets added by programming are not displayed automatically. You must use DashInitialConfiguration before the Dashboard control is displayed for the first time.
Ejemplo
WINDEV
// Add 2 elementsDashAddWidget(DASH_MyDashboard, IW_Sales, "Sales")
DashAddWidget(DASH_MyDashboard, IW_MonthlyStat, "Monthly statistics for July", "201307")
WINDEV
nIndex is int
// Adds a widget that expects parameters
nIndex = 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[nIndex].Visible = True
ELSE
 	ToastDisplay("The widget was added to the dashboard as ""hidden""." + ...
		"Switch to edit mode to add it.", ...
		toastShort, vaMiddle, haCenter)
END
Sintaxis
<Result> = DashAddWidget(<Dashboard control> , <Widget> , <Caption> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Integer
Index of the added element. This index can be used to handle the widget.
<Dashboard control>: Control name
Name of the Dashboard control to be used.
<Widget>: Name of the internal window or page
  • WINDEV Name of the internal window to be added to the Dashboard control.
<Caption>: Character string
Widget text. This caption will be displayed in the context 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 will be passed to the "Global declarations" event of the internal window or internal page to open. This parameter is passed by reference and it is considered as being a variable global to the internal window or internal page.
Please note: Only simple types are available.
<Parameter N>: Type of value sent to the window or page (optional)
Nth parameter that will be passed to the "Global declarations" event of the internal window or internal page to open. This parameter is passed by reference and it is considered as being a variable global to the internal window or internal page.
Please note: Only simple types are available.
Observaciones

New widget

The widget is declared in addition to the widgets defined in the Dashboard control description.
This widget can be made visible:
  • by using DashInitialConfiguration before the first display.
  • by the end user via the context menu.
  • by using the following syntax:
    DASH_Dashboard[Index].Visible = True
    where <Index> is the widget number returned by DashAddWidget.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 19
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local