STK X Send comments on this topic.
MouseWheel Event (AgUiAx2DCntrl)
See Also  Example
Button
Returns an integer that identifies the button that was pressed to cause the event. The Button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Shift
An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. 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). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of Shift is 6.
Delta
Gets a value that indicates the amount that the mouse wheel has changed.
X
Returns a number that specifies the x-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the control window coordinate system.
Y
Returns a number that specifies the y-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the control window coordinate system.
Windows






Windows & Linux

Description

Occurs when the mouse wheel is rotated on the control.

Syntax

[Visual Basic .NET]
Public Event MouseWheel( _
   ByVal Button As Integer, _
   ByVal Shift As Integer, _
   ByVal Delta As Integer, _
   ByVal X As Integer, _
   ByVal Y As Integer _
)

[C#]
public void MouseWheel(
int Button,
int Shift,
int Delta,
int X,
int Y
);

[Managed C++]
public: void MouseWheel(
int Button,
int Shift,
int Delta,
int X,
int Y
);

[Java]
public  mouseWheel(
ppInteger Button,
ppInteger Shift,
ppInteger Delta,
int X,
int Y
);

[Unmanaged C++]
public: HRESULT MouseWheel(
int Button,
int Shift,
int Delta,
long X,
long Y
);

Parameters

Button
Returns an integer that identifies the button that was pressed to cause the event. The Button argument is a bit field with bits corresponding to the left button (bit 0), right button (bit 1), and middle button (bit 2). These bits correspond to the values 1, 2, and 4, respectively. Only one of the bits is set, indicating the button that caused the event.
Shift
An integer that corresponds to the state of the SHIFT, CTRL, and ALT keys at the time of the event. 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). These bits correspond to the values 1, 2, and 4, respectively. Some, all, or none of the bits can be set, indicating that some, all, or none of the keys are pressed. For example, if both CTRL and ALT are pressed, the value of Shift is 6.
Delta
Gets a value that indicates the amount that the mouse wheel has changed.
X
Returns a number that specifies the x-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the control window coordinate system.
Y
Returns a number that specifies the y-position of the current location of the mouse pointer. The x and y values are always expressed in terms of the control window coordinate system.

Remarks

Occurs when the mouse wheel moves while the control has focus.

The MouseMove event is generated continually as the mouse pointer moves across the control.

If you need to test for the Button or Shift arguments, you can use constants available in AgEButtonValues and AgEShiftValues.

These constants act as bit masks you can use to test for any combination of buttons without having to figure out the unique bit field value for each combination.

 

In VB.NET the MouseWheel event is shown as  "xxxxxxxx_MouseWheelEvent" in the IDE.

Example

[Visual Basic .NET] Copy Code
Private Sub AxAgUiAx2DCntrl1_MouseWheelEvent( _
                            ByVal sender As Object, _
                            ByVal e As AxAGI.STKX.IAgUiAx2DCntrlEvents_MouseWheelEvent) _
                    Handles AxAgUiAx2DCntrl1.MouseWheelEvent

    'If the mouse wheel delta is positive, do something
    If (e.delta > 0) Then
        ....
    End If

End Sub

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface