API ReferenceSandbox.UI

DropEventclass

Files or text dragged in from outside the app - the desktop, an explorer window. Fires as "ondrop" on the deepest panel under the cursor and bubbles up from there: repeatedly with `Sandbox.UI.DropEvent.IsDrop` false while the drag hovers, so the panel can inspect the payload and set `Sandbox.UI.DropEvent.Action`, then once more with it true when the payload lands.

objectPanelEventDropEvent
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.DropEvent : Sandbox.UI.PanelEvent

Constructors1

Showing 1 constructors

Properties5

Showing 5 properties

public Sandbox.UI.DropAction Sandbox.UI.DropEvent.Action { get; set; }PUBLICGETSET

What dropping here would do. Leave `Sandbox.UI.DropAction.None` to reject - the OS drag cursor shows the answer while hovering.

Returns:DropAction

public System.Collections.Generic.IReadOnlyList`1<string> Sandbox.UI.DropEvent.Files { get; set; }PUBLICGETSET

Full paths of the dragged files. Empty when text is being dragged.

Returns:IReadOnlyList<string>

public bool Sandbox.UI.DropEvent.IsDrop { get; set; }PUBLICGETSET

False while the drag is still hovering - look at the payload and set `Sandbox.UI.DropEvent.Action` to answer. True when it actually lands.

Returns:bool

public string Sandbox.UI.DropEvent.Text { get; set; }PUBLICGETSET

The dragged text, or null when files are being dragged.

Returns:string

On this page