Mouse Up

Events Block - Package/Forms, Button

Description

The Mouse Up block performs a list of blocks when the computer mouse is released after having been clicked down on a form. The mouse is "captured" by the form so the Mouse Up event occurs whether the mouse is over the original form or not. A reported mouse position will be in the coordinates of the original form clicked even though the mouse release might have the mouse well outside the extent of the original form. The Mouse Up event is commonly used to make on-screen joysticks or to measure coordinates on a constructed graph.

These blocks are unique to each Package/Form. When the Event is dragged from the list on the left onto the Workpage it is removed from the list on the left. If you attempt to duplicate the block you receive this error:

Escapes

The Mouse Up block does not generate any escapes.

Examples

This example draws and measures the X and Y components of a line produced by clicking down, dragging, and releasing the mouse.....

... producing this:

This workpage of blocks illustrates how an on-screen joystick can be made that moves a motor at a speed proportional to the mouse click position's deviation from the center of the form either positive or negative:

Related Topics

Mouse Down
Mouse Drag
Mouse Position X
Mouse Position Y
Set Coordinate Frame