Summary
Represents the button click event data.
Signature
| public class ButtonClickEventArgs
|
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
29 | using cAlgo.API;
namespace cAlgo
{
// This example shows how to use the Button object Click event ButtonClickEventArgs
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class ButtonClickEventArgsSample : Indicator
{
protected override void Initialize()
{
var button = new Button
{
Text = "Button not clicked yet",
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center
};
// Whenever you click on the button the Button_Click method will be called
button.Click += Button_Click;
Chart.AddControl(button);
}
// Here we change the butto test when it's clicked
private void Button_Click(ButtonClickEventArgs obj)
{
obj.Button.Text = "Button Clicked";
}
public override void Calculate(int index)
{
}
}
}
|
See Also
Properties
Summary
Gets the button data.
Signature
| public Button Button {get;}
|
Return Value
Button
Related Tutorials