PC SOFT

WINDEV的在线文档

  • Overview
  • WinDev: The controls affected by the automatic Drag and Drop
  • Moves possible between controls:
  • WebDev: The controls affected by the automatic Drag and Drop
  • Configuring the default Drag and Drop
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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 by 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 by 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:
  • the edit controls,
  • the list boxes,
  • the listviews,
  • the tables,
  • the treeviews.

Special cases: Drag and Drop between two tables:

To perform an automatic Drag and Drop between two tables:
  • The number of columns must be identical. The content of column 1 of the source table will be copied into column 1 of the target table, idem for column 2, ...
  • The columns can have different names.
  • The type of the 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 programmed Drag and Drop.

Moves possible between controls:

Source elementTarget elementAction performed
Browsing tableMemory tableThe rows selected in the source table are copied into the target table.
Memory list boxThe rows selected in the table are copied into the target list box: 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 multi-line edit control, all the elements are copied (separated by a CR). The elements found in the different columns are separated by tabulations.
Memory tableMemory tableThe rows selected in the table are copied into the target table.
Memory list boxThe rows selected in the table are copied into the target list box: 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 multi-line edit control, all the elements are copied (separated by a CR). The elements found in the different columns are separated by tabulations.
Memory treeviewMemory treeviewThe selected branch (and its children) are copied to the position selected in the target treeview.
Memory list boxOnly the first selected branch is copied to the target list box. The child elements are not copied.
Edit controlOnly the first selected branch is copied. The child elements are not copied.
Browsing treeviewMemory treeviewThe selected branch and its children are copied to the position selected in the target treeview.
Memory list boxOnly the first selected branch is copied to the target list box. The child elements are not copied.
Edit controlOnly the first selected branch is copied. The children are ignored.
Memory list boxMemory list boxThe selected rows are copied into the target list box.
Memory treeviewThe selected elements are copied into the target treeview as branches.
Edit control
  • On a simple edit control, only the first element is copied.
  • On a multi-line edit control, all the elements are copied (separated by a CR)
Browsing list boxMemory list boxThe selected rows are copied into the target list box.
Memory treeviewThe selected elements are copied into the target treeview as branches.
Edit control
  • On a simple edit control, only the first element is copied.
  • On a multi-line edit control, all the elements are copied (separated by a CR)
Edit controlEdit controlThe content of the control is copied to the target control. For an operation performed from a multi-line edit control to a simple edit control, only the first row is copied.

Note: 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 programmed Drag and Drop).

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 the 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.

Notes:
  • 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. You must press the CTRL key simultaneously to perform a copy.
  • WinDevWindows In the treeviews, you have the ability to:
    • copy or move a root element before or after a treeview element.
    • copy or move an element into a sub-level of the treeview.
    • copy or move a simple element or an element and all its children.