PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
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
Adds a widget into a Dashboard control during Drag and Drop. This Drag and Drop can be performed from an Image control, a List Box control, a Looper control, ...
Caution: The widget is added for the current session. To store the added widget, you must use DashAddWidget.
Example
// -- Initialisation de IMG_WIDGET_Calendrier
 
// L'image est source de Drag and Drop
MySelf.DndSource = dndProgram
 
// Définit une procédure pour le "début de glisser"
// Cette procédure utilise la fonction DnDDonneElementTdb pour définir le widget à dropper
DnDEvent(onDndDebut, MySelf, dndBeginDrag)
PROCÉDURE onDndDebut()
 
// Selon le champ source, il faut définir le widget à dropper
SWITCH _DND.SourceControl
// Indique que le drop sur le champ Tableau de bord doit ajouter le widget "Horloge"
// en utilisant la fenêtre interne "FI_Widget_Horloge"
CASE IMG_Widget_Calendrier.Nom
DnDCacheDashElement("FI_Widget_Calendrier", "Horloge")
 
OTHER CASE
Error("Seule l'image IMG_Widget_Calendrier est autorisée pour le Drag and Drop")
 
END
Syntax
DnDCacheDashElement(<Widget name> , <Caption> [, <Parameter 1> [... [, <Parameter N>]]])
<Widget name>: Character string
Name of the internal window (or Widget) defined as target of Drag and Drop.
<Caption>: Character string
Caption of added widget.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will be passed to the "Global declarations" event of the internal window to open. This parameter is passed by reference and it is considered as being a variable global to the internal window.
Caution: Only the simple types are available.
<Parameter N>: Type of value sent to the window (optional)
Nth parameter that will be passed to the "Global declarations" event of the internal window to open. This parameter is passed by reference and it is considered as being a variable global to the internal window.
Caution: Only the simple types are available.
Remarks
  • This function must be used in the procedure associated with the "Begin drag" event.
  • This function initializes the Drag and Drop information required to add the element into the Dashboard control.
  • The Dashboard control must be defined as target of Drag and Drop (DndTarget).
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.
Component: wd270obj.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment