• HOME
  • PRODUCTS
  • DEMOS
  • BUY
  • BLOG
  • FORUM
  • DOCUMENTATION
  • ABOUT
  • FREE EVALUATION
Search Results for

    Show / Hide Table of Contents

    AcceptReturns Property

    AcceptReturns

    Gets or set a boolean value that indicates whether Enter key should be accepted by SyntaxEdit control as input key.

    Declaration
    public virtual bool AcceptReturns { get; set; }
    Property Value
    Type Description
    Boolean
    Implements
    ISyntaxEdit.AcceptReturns
    Remarks

    By default, pressing the ENTER key in a multiline SyntaxEdit control creates a new line of text in the text. Setting this property to false will activate the default button on the form instead.

    Alternatively, you can set the AcceptReturns property to false to use SyntaxEdit as a single-line editor.

    Examples

    Here is how to use a AcceptReturns 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.SingleLineMode = true;
            syntaxEdit1.AcceptReturns = false;
        }
    }
    

    Here is how to use a AcceptReturns 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.SingleLineMode = False
            syntaxEdit1.AcceptReturns = False
        End Sub
    End Class
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF