Skip to content

CheckBoxEventArgs

Summary

Provides data for the checkbox event.

Signature

1
public class CheckBoxEventArgs

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
23
24
25
26
27
28
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the CheckBoxEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class CheckBoxEventArgsSample : Indicator
     {
         protected override void Initialize()
         {
             var checkBox = new CheckBox
             {
                 Text = "Check Box",
                 HorizontalAlignment = HorizontalAlignment.Center,
                 VerticalAlignment = VerticalAlignment.Center,
             };
             checkBox.Click += CheckBox_Click;
             Chart.AddControl(checkBox);
         }
         private void CheckBox_Click(CheckBoxEventArgs obj)
         {
             var state = obj.CheckBox.IsChecked.Value ? "Checked" : "Unchecked";
             obj.CheckBox.Text = state;
         }
         public override void Calculate(int index)
         {
         }
     }
 }
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 import clr
 clr.AddReference("cAlgo.API")
 from cAlgo.API import *
 class Test():    
     def initialize(self):
         checkBox = CheckBox()
         checkBox.Text = "Check Box"
         checkBox.HorizontalAlignment = HorizontalAlignment.Center
         checkBox.VerticalAlignment = VerticalAlignment.Center
         checkBox.Click += self.on_check_box_click
         api.Chart.AddControl(checkBox)
     def on_check_box_click(self, args):
         state = "Checked" if args.CheckBox.IsChecked else "Unchecked"
         args.CheckBox.Text = state

See Also

Properties

CheckBox

Summary

Gets the checkbox data.

Signature

1
public CheckBox CheckBox {get;}

Return Value

CheckBox

Related Tutorials