TX Text Control .NET Server

SendMouseWheel Method

Method|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as 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);

Parameters

ParameterDescription
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.");
}