DR LAST CLICK

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR LAST CLICK (area; horizontal; vertical)

ParameterTypeDescription
areaLongint4D Draw area
horizontalNumberHorizontal position of the last click
verticalNumberVertical position of the last click

Description

The command DR LAST CLICK returns into the horizontal and vertical variables the position of the last mouse click in area according to the current position of the origin.

Both horizontal and vertical are expressed in base units. Use the DR Base to scale function to convert from base units to scale units.

DR LAST CLICK returns the point where the mouse was clicked, not where it was released. For an action such as dragging or resizing, DR LAST CLICK returns the position that the pointer was in when the mouse button was pressed. You can use DR LAST CLICK in the object method of an area or in an event method to obtain the position where an object was clicked.

Example

The following example is the object method for a 4D Draw area on a form. Each time the object method is executed, DR LAST CLICK places the mouse position into the vHorizontal and vVertical variables. If these variables are displayed on the form the user will have immediate feedback on exactly where the mouse was clicked.

   DR LAST CLICK (Area;vHorizontal;vVertical)

See Also

DR EVENT FILTER, DR Last event.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next