API ReferenceSandbox.UI

Dragclass

An outgoing OS drag from a panel - files and/or text the user can drop on anything that takes them, other windows, other apps and the desktop included. Fill it in, then `Sandbox.UI.Drag.Start`.

objectDrag
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.Drag

Constructors1

Showing 1 constructors

public Drag(Sandbox.UI.Panel panel)PUBLICCONSTRUCTOR

ParameterTypeDescription
panelPanel

Methods3

Showing 3 methods

public void SetFile(string path)PUBLIC

Carry this file. Call again to carry more than one.

ParameterTypeDescription
pathstring
Returns:void

public void SetText(string text)PUBLIC

Carry this text.

ParameterTypeDescription
textstring
Returns:void

public Sandbox.UI.DropAction Start()PUBLIC

Start the drag. Blocks while the user drags it around - the panel windows keep painting through it - and returns what the receiver did with the payload once they let go. None when it was cancelled or nothing was carried.

Returns:DropAction

On this page