Property IsMultiline
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
IsMultiline
Gets or sets a value indicating whether users are able to enter multiple lines of text.
public bool IsMultiline { get; set; }
Property Value
- bool
trueif users are able to enter multiple lines of text; otherwise,false.
Examples
UIBlockDefinition blockItem = new UIBlockDefinition();
blockItem.Type = UIBlockType.TextBox;
blockItem.IsMultiline = true;
uibDialogBox1.AppendBlock(blockItem);
Remarks
Applicable only when Type is set to TextBox or StaticText.
If IsMultiline is false on a StaticText UI block, but the text contains a newline/enter, the UI block will behave as if IsMultiline is true.
When an interactive automation script is running in a web environment, the textbox will consider \n as a newline, while Cube will use \r\n.
It is possible to mix both types in the initial value.
To easily split the text values into lines when an interactive automation script is running in both environments, you can use the following code snippet:
var lines = textBoxStringValue?
.Split('\n')
.Select(x => x.Trim('\r'));
After processing, joining the lines using \n should work consistently across both environments.