Skip to content

ChartMouseWheelEventArgs

Summary

Provides data for the mouse wheel scroll event.

Signature

1
public class ChartMouseWheelEventArgs : ChartMouseEventArgs

Namespace

cAlgo.API

Properties

Name Description
Delta { get; } Gets the number of detents the mouse wheel has rotated. A detent is one notch of the mouse wheel.

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)
         {
         }
     }
 }

See Also


Last update: December 5, 2022

Comments