The dragtext statement starts drag-and-drop of text.


This statement has three parameters:

text – is the text you want to drag.

option – The name of an option that modifies the operation of this statement. See below for descriptions of each option. The option can be specified in either upper or lower case.

value – The new value for this option.


The dragtext statement allows a program to start a drag-and-drop sequence. This statement is designed to be used as part of a procedure that is triggered by a button. (The button should be set up to trigger the procedure when the mouse is clicked, not when it is released.)

In its simplest form all you need to supply is the text to be dragged.

dragtext "Drag Me"

When the user clicks on the button, they can drag the text to anything that can receive text (typically text editors, but you can also set up form objects to receive dragged text). During the drag, a semi-transparent image of the button that was clicked will follow the mouse.

Drag Options

The appearance and operation of the drag can be modified by adding one or more pairs of option/value parameters to the dragtext statement, like this:

dragtext text,option1,value1,option2,value2,option3,value3,option4,value4

Each of the available options are described below.


During the drag, Panorama normally creates a semi-transparent image of the button that was clicked. This semi-transparent image follows the mouse as you drag. Use the image option to specify a custom image to drag instead.

dragtext userName,"image","~/Pictures/person.png"

The image file can be a .png, jpg, .tif or .pdf file.


During the drag, Panorama normally creates a semi-transparent image of the button that was clicked. Use the Rectangle function to create a semi-transparent image of a custom region of the screen. For example, perhaps in addition to the button itself you would like to drag a larger area – perhaps an area that includes both the button and some displayed data. If you use this parameter, the rectangle must be specified in screen co-ordinates. You should also make sure that the rectangle includes the mouse position – otherwise it could be confusing for the user. (Note: This parameter can be abbreviated as rect instead of rectangle).


Set this option to true if the text contains VCard data.

dragtext vCardData,"vcard","true"

Set this option to false if you don’t want the dragged image to slide back to the source after a failed drag. If this option is set to false the image will simply fade in place instead of sliding back to the original position.

See Also


10.0UpdatedNew in this version.