Class
WebDragItem
Description
Contains the details for a control that was dragged and now dropped onto another control.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
Enumerations
WebDragItem.DragActionTypes
DragActionTypes
Specifies the type of drag the user is making.
Name
None
Copy
Move
Link
CopyAndMove
CopyAndLink
LinkAndMove
All
Property descriptions
WebDragItem.OriginX
OriginX As Integer
Indicates the X coordinate within the Sender WebControl where the drag began.
WebDragItem.OriginY
OriginY As Integer
Indicates the Y coordinate within the Sender WebControl where the drag began.
WebDragItem.Sender
Sender As WebUIControl
The control from which the item was dragged.
WebDragItem.Tag
Tag As Variant
The tag which indicates the specific item that was dragged.
Method descriptions
WebDragItem.Picture
Picture As Picture
The picture which was dragged. This value will be Nil if no picture was dragged.
WebDragItem.PictureAvailable
PictureAvailable As Boolean
Returns True if a picture object is associated with the WebDragItem.
WebDragItem.RawData
RawData As String
Returns an object associated with the WebDragItem.
WebDragItem.RawDataAvailable
RawDataAvailable As Boolean
Returns True if a RawData item of the specified Mime type is available on the WebDragItem.
WebDragItem.TextValue
TextValue As String
The text which was dragged. This value will be empty if the WebDragItem contains no text.
WebDragItem.TextValueAvailable
TextValueAvailable As Boolean
Returns True if a the WebDragItem contains text.
Sample Code
Add the following code into the Opening-Event of your WebUIControl:
Me.AllowTextDrag(WebDragItem.DragActionTypes.Copy)
Next, insert this code into the Opening-Event of the receiving object:
Me.AcceptTextDrop(WebDragItem.DragActionTypes.Copy)
Add the DropObject-Event to the receiving object. Here we assume that a WebRectangle instance can be dragged onto a WebTextArea:
' Casts obj.Sender to the original WebRectangle type
Var rectangle As WebRectangle = WebRectangle(obj.Sender)
'' Appends the name of the control and its CornerSize property
Me.Text = Me.Text + obj.Sender.Name + ", CornerSize: " + rectangle.CornerSize.ToString + EndOfLine
Compatibility
Project Types |
Web |
Operating Systems |
All |
See also
Object parent class; Supporting Drag and Drop topic