PC SOFT

WINDEV的在线文档

  • Overview
  • Controls taken into account by the programmed Drag and Drop
  • Principle
  • Programmed Drag and Drop - Simplified mode
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Overview
The programmed Drag and Drop is used to entirely manage the Drag/Drop between the different types of controls. Depending on its type, the control can be source or target of Drag and Drop.

This help page presents:

Detailed examples for using the programmed Drag and Drop are available:

Controls taken into account by the programmed Drag and Drop
WinDev The following controls are taken into account by the programmed Drag and Drop:
Source of Drag and DropTarget of Drag and Drop
Only the following controls:
  • Edit control
  • List box and listview
  • TreeView
  • Table
  • Image
  • Bar code
  • Button
  • Looper
  • Chart
  • TreeView table
  • Calendar
  • Organizer
  • Scheduler
All types of controls except:
  • Progress bar
  • ActiveX
  • OLE
  • Shape
  • Toolbar
  • HTML
  • Web camera
  • Video conference

Principle
To perform a programmed Drag and Drop between several controls of a WinDev application or WebDev site:
  1. In the initialization code of the source control:
    • Define that a programmed Drag and Drop will be performed (..鼠标拖放源).
    • Define the procedure run at the beginning of the "Drag" action (鼠标拖放事件 for the 鼠标拖放.开始拖动 event).
  2. In the initialization code of the target control:
    • Define that a programmed Drag and Drop will be performed (..鼠标拖放目标).
    • Define the procedure run when the control is hovered (鼠标拖放事件 for the 鼠标拖放.滑过 event). In this procedure, you have the ability to define the mouse cursor with 鼠标拖放光标.
    • Define the procedure run when the "Drop" action is performed on the control (鼠标拖放事件 for the 鼠标拖放.释放 event).
  3. In each one of the WLanguage procedures called, define the action to run via the "Drag and Drop" functions of WLanguage.

WinDev

Programmed Drag and Drop - Simplified mode

To enable the programmed Drag and Drop, you also have the ability to enable the Drag and Drop processes in the code of the control.
This activation replaces the call to 鼠标拖放事件 as well as the creation of the associated procedures. However, this simplified management is only available for the following types of controls:
  • Table,
  • TreeView,
  • TreeView table,
  • Looper.

Equivalence between 鼠标拖放事件 and the processes for managing Drag and Drop:

Full programmed mode
Constant used by DndEvent(Procedure Name, Control, Constant)
Simplified programmed mode

Process of the control

DndBeginDragBeginning of source Drag/Drop (DndBeginDrag)
DndEndDragEnd of source Drag/Drop (DndEndDrag)
DndDragEnterEntry in target Drag/Drop (DndDragEnter)
DndDragOverRollover in target Drag/Drop (DndDragOver)
DndDropDrop in target Drag/Drop (DndDrop)
DndDragLeaveExit in source Drag/Drop (DndDragLeave)

The code of the procedure will be inserted in the process of the control.