Child pages
  • DRAGNDROP
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Refresh page Apr 29, 2024 16:36

Supported Clients
SmartClient WebClient

Constants Summary
Number COPY Constant for copy drag operation.
String MIME_TYPE_SERVOY Constant used as mime type for servoy objects.
String MIME_TYPE_SERVOY_RECORD Constant used as mime type for servoy record objects.
Number MOVE Constant for move drag operation.
Number NONE Constant for no drag operation.

Constants Details

COPY

Constant for copy drag operation.

Returns

Supported Clients

SmartClient,WebClient

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

MIME_TYPE_SERVOY

Constant used as mime type for servoy objects.

Returns

Supported Clients

SmartClient,WebClient

Sample

if (event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY || event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY_RECORD) {
	application.output("Dropping is allowed" );
	return true;
} else { 
	application.output("Dropping is not allowed" );
	return false;
}

MIME_TYPE_SERVOY_RECORD

Constant used as mime type for servoy record objects.

Returns

Supported Clients

SmartClient,WebClient

Sample

if (event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY || event.dataMimeType == DRAGNDROP.MIME_TYPE_SERVOY_RECORD) {
	application.output("Dropping is allowed" );
	return true;
} else { 
	application.output("Dropping is not allowed" );
	return false;
}

MOVE

Constant for move drag operation.

Returns

Supported Clients

SmartClient,WebClient

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

NONE

Constant for no drag operation.

Returns

Supported Clients

SmartClient,WebClient

Sample

function startDrag(event)
{
	if(event.getElementName() == "copy")
		return DRAGNDROP.COPY;
	else if(event.getElementName() == "move")
		return DRAGNDROP.MOVE

	return DRAGNDROP.NONE;
}

  • No labels