Command WR Mouse to selection

4D Write

WR Mouse to selection

version 6.5 (Modified)


WR Mouse to selection (area; posHoriz; posVert; beginSel; endSel) Integer

ParameterTypeDescription
areaLongint4D Write area
posHorizIntegerHorizontal position of mouse in area
posVertIntegerVertical position of mouse in area
beginSelLongintReturns beginning of selection
endSelLongintReturns end of selection

Function result Integer Selection matching the position of the cursor

Description

The WR Mouse to selection command returns the selection matching the position of the cursor. The command returns 0 if the cursor points to text and returns 1 if it points to a picture.

WR Mouse to selection is used in conjunction with the Drag and Drop manager to find the location of the cursor when the mouse was released and an object was pasted.

beginSel and endSel return a particular value when you release the mouse button on a reference. Warning: In this case, endSel = beginSel +1. In other words, a reference = 1 character regardless of the number of characters contained in the reference, after computing.

The posHoriz and posVert parameters return 0000 by default. In order for them to return a value, you must use the 4D GET MOUSE command beforehand. For more information, please refer to the documentation of this command.

See Also

GET MOUSE.