TextBox.MaxLength
property · TextBox · cAlgo.API
DesktopCLICloud
Gets or sets the maximum number of characters that can be manually entered into the text box.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public int MaxLength {get; set;}
textBox.MaxLength: int
Returns int
Examples
var labelTextBox = new TextBox { MaxLength = 20, Width = 150 };
Chart.AddControl(labelTextBox);
Print("Maximum label length: {0}", labelTextBox.MaxLength);
labelTextBox = TextBox()
labelTextBox.MaxLength = 20
labelTextBox.Width = 150
api.Chart.AddControl(labelTextBox)
api.Print(f"Maximum label length: {labelTextBox.MaxLength}")