SendMouseWheel Method
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
Description
Informs the view generator about a mouse wheel event.
Syntax
public bool SendMouseWheel(Point viewLocation, int delta, UserInput.MouseButtons button, UserInput.ModifierKeys modifierKeys);Public Function SendMouseWheel(viewLocation As Point, delta As Integer, button As UserInput.MouseButtons, modifierKeys As UserInput.ModifierKeys) As BooleanParameters
| Parameter | Description |
|---|---|
| viewLocation | Specifies the location, where the mouse wheel event occurs. The coordinates must be in pixels with an origin at the top-left corner of the view's location. |
| delta | Indicates the distance the wheel is rotated, expressed in multiples or divisions of 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. |
| button | Specifies a pressed mouse button. It can be a value from the ServerVisualization.UserInput.MouseButtons enumeration. |
| modifierKeys | Specifies modifier keys. It can be a combination of the ServerVisualization.UserInput.ModifierKeys values. |
Return Value
If the event has been handled, the method returns true. Otherwise, it returns false.
Examples
The following example uses Send Mouse Wheel in a focused User Input workflow.
if (userInput.SendMouseWheel(new System.Drawing.Point(20, 20), 10, TXTextControl.ServerVisualisation.UserInput.MouseButtons.Left, TXTextControl.ServerVisualisation.UserInput.ModifierKeys.Shift))
{
Console.WriteLine("Send Mouse Wheel completed successfully.");
}If userInput.SendMouseWheel(New System.Drawing.Point(20, 20), 10, TXTextControl.ServerVisualisation.UserInput.MouseButtons.Left, TXTextControl.ServerVisualisation.UserInput.ModifierKeys.Shift) Then
Console.WriteLine("Send Mouse Wheel completed successfully.")
End If