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 de arrastrar y soltar
  • Overview
  • WINDEV: The controls affected by the automatic Drag and Drop
  • Moves allowed between controls:
  • WEBDEV: The controls affected by the automatic Drag and Drop
  • Configuring the default Drag and Drop
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Automatic Drag and Drop
Overview
For some types of controls, WINDEV and WEBDEV propose an automatic management of Drag and Drop.
No specific programming is required. In the control description, all you have to do is specify that Drag and Drop must be supported.
You must not:
  • call the functions for managing the Drag and Drop through programming,
  • enable the codes for managing the Drag and Drop in the processes of the controls.
Otherwise, the automatic management will be disabled: therefore, Drag and Drop must be managed through programming.
This page presents:
WINDEV: The controls affected by the automatic Drag and Drop
In WINDEV, the automatic Drag and Drop is available for the following controls:
  • Edit control,
  • Novedad versión 2024
    control "Text tokens" input system (Drag and Drop tokens).
  • List Box control,
  • ListView control,
  • Table control,
  • TreeView control.
Special cases: Drag and Drop between two Table controls:
To perform an automatic Drag and Drop between two Table controls:
  • The number of columns must be identical. The content of column 1 of source Table control will be copied into column 1 of target Table control, idem for column 2, ...
  • The columns can have different names.
  • The type of columns can be different. CAUTION: In this case, the data can be altered or lost during the transfer (automatic conversions). In this case, we recommend that you use the drag-and-drop operations set programmatically.

Moves allowed between controls:

Source elementTarget elementAction performed
control Table fileTable control populated programmaticallyThe rows selected in the source Table control are copied into the target Table control.
List Box control populated programmaticallyThe rows selected in the Table control are copied into the target List Box control: the data found in the columns is separated by tabulations.
Edit control
  • on a simple edit control, only the first element is copied. The elements found in the different columns are separated by tabulations.
  • on a multiline edit control, all elements are copied (separated by a CR). The elements found in the different columns are separated by tabulations.
Table control populated programmaticallyTable control populated programmaticallyThe rows selected in the Table control are copied into the target Table control.
List Box control populated programmaticallyThe rows selected in the Table control are copied into the target List Box control: the data found in the columns is separated by tabulations.
Edit control
  • On a simple edit control, only the first element is copied. The elements found in the different columns are separated by tabulations.
  • On a multiline edit control, all elements are copied (separated by a CR). The elements found in the different columns are separated by tabulations.
TreeView control populated programmaticallyTreeView control populated programmaticallyThe selected branch (and its children) are copied to the selected position in the target TreeView control.
List Box control populated programmaticallyOnly the first selected branch is copied to the target List Box control. The child elements are not copied.
Edit controlOnly the first selected branch is copied. The child elements are not copied.
control Tree fileTreeView control populated programmaticallyThe selected branch (and its children) are copied to the selected position in the target TreeView control.
List Box control populated programmaticallyOnly the first selected branch is copied to the target List Box control. The child elements are not copied.
Edit controlOnly the first selected branch is copied. The children are ignored.
List Box control populated programmaticallyList Box control populated programmaticallyThe selected rows are copied into the target List Box control.
TreeView control populated programmaticallyThe selected elements are copied into the target TreeView control as branches.
Edit control
  • On a simple edit control, only the first element is copied.
  • On a multiline edit control, all elements are copied (separated by a CR).
control File listList Box control populated programmaticallyThe selected rows are copied into the target List Box control.
TreeView control populated programmaticallyThe selected elements are copied into the target TreeView control as branches.
Edit control
  • On a simple edit control, only the first element is copied.
  • On a multiline edit control, all elements are copied (separated by a CR).
Edit controlEdit controlThe control content is copied to the target control. For an operation performed from a multiline edit control to a simple edit control, only the first row is copied.
Novedad versión 2024
control "Text tokens" input device
control "Text tokens" input deviceThe control content is copied to the target control. It is possible to:
  • move tokens within the same edit control, if the control is both target and source.
  • copy tokens from one edit control to another.


Remark: These controls can be:
  • in the same window,
  • in another window of the application (Multi-windowing or MDi),
  • in a window of another WINDEV application.
For the other types of controls that accept Drag and Drop, the Drag and Drop must be programmed (see drag-and-drop operations set programmatically).
WEBDEV: The controls affected by the automatic Drag and Drop
In WEBDEV, the automatic Drag and Drop is available for the following controls:
  • Upload control,
  • Static control,
  • Button control,
  • Link control,
  • Image control,
  • Formatted Static control,
  • Edit control,
  • List Box control,
  • Combo Box control.
Moves allowed between controls:
Source elementAction performed
ButtonThe button caption is copied.
Static or formatted staticThe content of the static is copied.
LinkThe link caption is copied.
List box or combo boxThe selected row is copied.
ImageIf the destination is an image, the image content is copied.
If the destination is another type of control, the image path is copied.
Edit controlThe control content is copied to the target control.
Remark: At this time, only Firefox and Chrome fully support Drag and Drop via HTML 5. If the new versions of the different browsers include the management of Drag and Drop via HTML 5, this feature will be automatically supported by WEBDEV.
Configuring the default Drag and Drop
For the controls that propose the automatic Drag and Drop, this feature is configured in the "Details" screen of control description.
The "Is source" option is used to define the control as "Source" of Drag and Drop. The user will be able to select the content of the control and to move it to another control for example.
The "Is target" option is used to define the control as "Target" of Drag and Drop. This control will be able to receive any object "dropped" by the user.
The two options can be selected simultaneously.
Remarks:
  • If only the "Is source" option is checked for the control, the action performed by default will be a copy. The cut is not allowed.
  • If the "Is source" and "Is target" options are checked for the control, the action performed by default will be a cut. Press the Ctrl key simultaneously to perform a copy.
  • Windows In TreeView controls, it is possible to:
    • copy or move a root element before or after an element of the TreeView control.
    • copy or move an element to a sub-level of the TreeView control.
    • copy or move a single element or an element and all its children.
Ver también
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/05/2024

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