PlotAreaMouseDown, PlotAreaMouseMove, PlotAreaMouseUp Events
Syntax
Sub ControlName_PlotAreaMouseDown( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant)
Sub ControlName_PlotAreaMouseMove( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant)
Sub ControlName_PlotAreaMouseUp( Button As Integer, Shift As Integer, XPos As Variant, YPos As Variant)
Applies To
Purpose
PlotAreaMouseDown generates when you click the mouse on the plot area.
PlotAreaMouseMove generates when you move the mouse over the plot area.
PlotAreaMouseUp generates when you release the mouse over the plot area.
Remarks
These events generate only if CWGraph.TrackMode is set to cwGTrackAllEvents or cwGTrackPlotAreaEvents.
If you have multiple y axes, the y axis for the template plot is used. The point returned is the point clicked on, not the nearest point on a plot.
In Visual Basic, use the following constants with the Button and Shift parameters:
vbLeftButton | 1 | Left button is pressed |
vbRightButton | 2 | Right button is pressed |
vbMiddleButton | 4 | Middle button is pressed |
vbShiftMask | 1 | <Shift> key is pressed |
vbCtrlMask | 2 | <Ctrl> key is pressed |
vbAltMask | 4 | <Alt> key is pressed |
Parameters
Button As Integer
State of the mouse buttons. The Button argument can be any combination of the following values: 1 for the left button, 2 for the right button, or 4 for the middle button. For example, if both the left and right mouse buttons are pressed, the Button argument is 3 (1 + 2). In the PlotAreaMouseUp event, the Button argument corresponds to the state of the buttons after the triggering button is released.
Shift As Integer
State of the <SHIFT> , <CTRL> , and <ALT> keys when the button specified in the Button argument is pressed, released, or moved. The Shift argument is a bit field with the least-significant bits corresponding to the <SHIFT> key (Bit 0), the <CTRL> key (Bit 1), and the <ALT> key (Bit 2 ). Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed.
XPos As Variant
The X coordinate as defined by the X axis of the template plot.
YPos As Variant
The Y coordinate as defined by the Y axis of the template plot.