CheckBoxEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for the checkbox event.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (CheckBox.Checked, CheckBox.Click, CheckBox.Indeterminate and more).
Definition
public class CheckBoxEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the CheckBoxEventArgs
public partial 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)
{
}
}
}
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
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Properties
| Name | Description |
|---|---|
CheckBoxDesktopCLICloudCheckBox | Gets the checkbox data. |