Table of Contents

Property SingleLineMode

Namespace
Alternet.Editor
Assembly
Alternet.Editor.v9.dll

SingleLineMode

Gets or sets a value indicating whether the control accepts only one line of the text.

public virtual bool SingleLineMode { get; set; }

Property Value

bool

Examples

Here is how to use a SingleLineMode in the C# code:

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit1 = new Alternet.Editor.SyntaxEdit(this.components);
        syntaxEdit1.Text = "this is single line";
        syntaxEdit1.SingleLineMode = true;
    }
}

Here is how to use a SingleLineMode in the Visual Basic code:

Partial Public Class Form1
    Inherits Form

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit1 = New Alternet.Editor.SyntaxEdit(Me.components)
        syntaxEdit1.Text = "this is single line")
        syntaxEdit1.SingleLineMode = True
    End Sub
End Class

Remarks

Set SingleLineMode property to true to restrict SyntaxEdit to display a single line of text. In this case, pressing the ENTER key will not create a new line of text.