ChartMouseWheelEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for the mouse wheel scroll event.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartArea.MouseWheel).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartArea.MouseWheel).
Definition
public class ChartMouseWheelEventArgs : ChartMouseEventArgs
Namespace: cAlgo.API · Group: EventArgs · Inherits: ChartMouseEventArgs
Examples
using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the Chart ChartMouseWheelEventArgs
// ChartMouseWheelEventArgs derives from ChartMouseEventArgs
public partial class ChartMouseWheelEventArgsSample : Indicator
{
protected override void Initialize()
{
Chart.MouseWheel += Chart_MouseWheel;
}
private void Chart_MouseWheel(ChartMouseWheelEventArgs obj)
{
var text = string.Format("Wheel Delta: {0}", obj.Delta);
Chart.DrawStaticText("Wheel", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
}
public override void Calculate(int index)
{
}
}
}
import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
class Test():
def initialize(self):
api.Chart.MouseWheel += self.on_chart_mouse_wheel
def on_chart_mouse_wheel(self, args):
text = f"Wheel Delta: {args.Delta}"
api.Chart.DrawStaticText("Wheel", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Properties
| Name | Description |
|---|---|
DeltaDesktopCLICloudint | Gets the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel. |
Inherited members
From ChartMouseEventArgs: Chart, ChartArea, MouseX, MouseY, TimeValue, BarIndex, YValue, CtrlKey, ShiftKey, AltKey