TextChangedEventArgs
class cAlgo.API
DesktopCLICloud
Provides data for the TextChanged event.
Environment behaviour
CLI — not supported. Never raised in the CLI: the events that pass it never fire there (TextBox.TextChanged).
Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (TextBox.TextChanged).
Definition
public class TextChangedEventArgs
Namespace: cAlgo.API · Group: EventArgs
Examples
using cAlgo.API;
namespace cAlgo
{
// This sample indicator shows how to use TextChangedEventArgs
public partial class Test : Indicator
{
protected override void Initialize()
{
var stackPanel = new StackPanel
{
BackgroundColor = Color.Gold,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Opacity = 0.6,
};
var textBox = new TextBox
{
Text = "Enter text here...",
FontWeight = FontWeight.ExtraBold,
Margin = 5,
ForegroundColor = Color.White,
HorizontalAlignment = HorizontalAlignment.Center,
Width = 150
};
textBox.TextChanged += OnTextBoxTextChanged;
stackPanel.AddChild(textBox);
Chart.AddControl(stackPanel);
}
private void OnTextBoxTextChanged(TextChangedEventArgs obj)
{
Print("Text box text changed to: {0}", obj.TextBox.Text);
}
public override void Calculate(int index)
{
}
}
}
import clr
clr.AddReference("cAlgo.API")
from cAlgo.API import *
class Test():
def initialize(self):
stackPanel = StackPanel()
stackPanel.BackgroundColor = Color.Gold
stackPanel.HorizontalAlignment = HorizontalAlignment.Center
stackPanel.VerticalAlignment = VerticalAlignment.Center
stackPanel.Opacity = 0.6
textBox = TextBox()
textBox.Text = "Enter text here..."
textBox.FontWeight = FontWeight.ExtraBold
textBox.Margin = Thickness(5)
textBox.ForegroundColor = Color.White
textBox.HorizontalAlignment = HorizontalAlignment.Center
textBox.Width = 150
textBox.TextChanged += self.on_text_box_changed
stackPanel.AddChild(textBox)
api.Chart.AddControl(stackPanel)
def on_text_box_changed(self, args):
print(f"Text box text changed to: {args.TextBox.Text}")
{
"AccessRights": "None",
"TimeZone": "UTC",
"IsOverlay": true
}
Properties
| Name | Description |
|---|---|
TextBoxDesktopCLICloudTextBox | Gets the texbox. |