PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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 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
// -- Initialize IMG_WIDGET_Calendar

// The image is source of Drag and Drop
MySelf..DndSource = dndProgram

// Defines a procedure for "begin drag"
// This procedure is using DnDCacheDashElement to define the widget to drop
DnDEvent(onDndBegin, MySelf, dndBeginDrag)
PROCÉDURE onDndBegin()

// Define the widget to drop according to the source control
SWITCH _DND.SourceControl
// Indicates that the drop on the Dashboard control must add the "Clock" widget
// by using the "IW_Widget_Clock" internal window
CASE IMG_Widget_Calendar..Name
DnDCacheDashElement("IW_Widget_Calendar", "Clock")

OTHER CASE
Error("Only the IMG_Widget_Calendar image is allowed for Drag and Drop")

END
Syntax
DnDCacheDashElement(<Widget Name>, <Caption> [ , <Parameter 1> [ , <Parameter 2> [ , ... ]]])
<Widget Name>: Character string (with quotes)
Name of the internal window (or Widget) defined as target of Drag and Drop.
<Caption>: Character string (with quotes)
Caption of added Widget.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will be passed to the "Declaration of global variables" process of the internal window to open. This parameter is passed by address and it is considered as being a variable global to the internal window.
Caution: Only the simple types are available.
<Parameter 2>: Type of value sent to the window (optional)
Second parameter that must be passed to the "Declaration of global variables" process of the internal window to open. This parameter is passed by address 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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment