Skip to content

ChartMouseWheelEventArgs

Summary

Provides data for the mouse wheel scroll event.

Signature

1
public class ChartMouseWheelEventArgs : ChartMouseEventArgs

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the Chart ChartMouseWheelEventArgs
     // ChartMouseWheelEventArgs derives from ChartMouseEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public 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)
         {
         }
     }
 }
1
2
3
4
5
6
7
8
9
 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)

See Also

Properties

Delta

Summary

Gets the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.

Signature

1
public int Delta {get;}

Return Value

int