Class

# WebDragItem

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Contains the details for a control that was dragged and now dropped onto another control.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                           | Type                                                 | Read-Only | Shared |
|--------------------------------|------------------------------------------------------|-----------|--------|
| `OriginX<webdragitem.originx>` | `Integer</api/data_types/integer>`                   |           |        |
| `OriginY<webdragitem.originy>` | `Integer</api/data_types/integer>`                   |           |        |
| `Sender<webdragitem.sender>`   | `WebUIControl</api/user_interface/web/webuicontrol>` |           |        |
| `Tag<webdragitem.tag>`         | `Variant</api/data_types/variant>`                   |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                 | Parameters | Returns                            | Shared |
|------------------------------------------------------|------------|------------------------------------|--------|
| `Picture<webdragitem.picture>`                       |            | `Picture</api/graphics/picture>`   |        |
| `PictureAvailable<webdragitem.pictureavailable>`     |            | `Boolean</api/data_types/boolean>` |        |
| `RawData<webdragitem.rawdata>`                       |            | `String</api/data_types/string>`   |        |
| `RawDataAvailable<webdragitem.rawdataavailable>`     |            | `Boolean</api/data_types/boolean>` |        |
| `TextValue<webdragitem.textvalue>`                   |            | `String</api/data_types/string>`   |        |
| `TextValueAvailable<webdragitem.textvalueavailable>` |            | `Boolean</api/data_types/boolean>` |        |

## Enumerations

<div id="webdragitem.dragactiontypes">

<div class="rst-class">

forsearch

</div>

</div>

WebDragItem.DragActionTypes

### DragActionTypes

> Specifies the type of drag the user is making.
>
> | Name        |
> |-------------|
> | None        |
> | Copy        |
> | Move        |
> | Link        |
> | CopyAndMove |
> | CopyAndLink |
> | LinkAndMove |
> | All         |

## Property descriptions

<div id="webdragitem.originx">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.OriginX

**OriginX** As `Integer</api/data_types/integer>`

> Indicates the X coordinate within the Sender WebControl where the drag began.

<div id="webdragitem.originy">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.OriginY

**OriginY** As `Integer</api/data_types/integer>`

> Indicates the Y coordinate within the Sender WebControl where the drag began.

<div id="webdragitem.sender">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.Sender

**Sender** As `WebUIControl</api/user_interface/web/webuicontrol>`

> The control from which the item was dragged.

<div id="webdragitem.tag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.Tag

**Tag** As `Variant</api/data_types/variant>`

> The tag which indicates the specific item that was dragged.

## Method descriptions

<div id="webdragitem.picture">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.Picture

**Picture** As `Picture</api/graphics/picture>`

> The picture which was dragged. This value will be `Nil</api/language/nil>` if no picture was dragged.

<div id="webdragitem.pictureavailable">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.PictureAvailable

**PictureAvailable** As `Boolean</api/data_types/boolean>`

> Returns `True</api/language/true>` if a picture object is associated with the <span class="title-ref">WebDragItem</span>.

<div id="webdragitem.rawdata">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.RawData

**RawData** As `String</api/data_types/string>`

> Returns an object associated with the <span class="title-ref">WebDragItem</span>.

<div id="webdragitem.rawdataavailable">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.RawDataAvailable

**RawDataAvailable** As `Boolean</api/data_types/boolean>`

> Returns `True</api/language/true>` if a RawData item of the specified Mime type is available on the <span class="title-ref">WebDragItem</span>.

<div id="webdragitem.textvalue">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.TextValue

**TextValue** As `String</api/data_types/string>`

> The text which was dragged. This value will be empty if the <span class="title-ref">WebDragItem</span> contains no text.

<div id="webdragitem.textvalueavailable">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

WebDragItem.TextValueAvailable

**TextValueAvailable** As `Boolean</api/data_types/boolean>`

> Returns `True</api/language/true>` if a the <span class="title-ref">WebDragItem</span> contains text.

## Sample Code

Add the following code into the `Opening<webuicontrol.opening>`-Event of your `WebUIControl</api/user_interface/web/webuicontrol>`:

``` xojo
Me.AllowTextDrag(WebDragItem.DragActionTypes.Copy)
```

Next, insert this code into the `Opening<webuicontrol.opening>`-Event of the receiving object:

``` xojo
Me.AcceptTextDrop(WebDragItem.DragActionTypes.Copy)
```

Add the `DropObject<webuicontrol.dropobject>`-Event to the receiving object. Here we assume that a `WebRectangle</api/user_interface/web/webrectangle>` instance can be dragged onto a `WebTextArea</api/user_interface/web/webtextarea>`:

``` xojo
' 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 |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `Supporting Drag and Drop</topics/user_interface/desktop/supporting_drag_and_drop>` topic

</div>
