Table of Contents

Property EditMargin

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

EditMargin

Represents an object that implements IMargin interface and specifies appearance of vertical line drawn over the text and used to mark some limit, for example, of the maximum string length allowed.

[TypeConverter(typeof(ExpandableObjectConverter))]
public virtual IMargin EditMargin { get; set; }

Property Value

IMargin

Examples

Here is how to use a EditMargin 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.EditMargin.Position = 60;
        syntaxEdit1.EditMargin.Visible = true;
        syntaxEdit1.WordWrap = true;
        syntaxEdit1.WrapAtMargin = true;
    }
}

Here is how to use a EditMargin 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.EditMargin.Position = 60
        syntaxEdit1.EditMargin.Visible = True
        syntaxEdit1.WordWrap = True
        syntaxEdit1.WrapAtMargin = True
    End Sub
End Class

Remarks

When the WordWrap and WrapAtMargin properties are set to true, the SyntaxEdit control can display a vertical line at the specified character position and optionally wrap text lines at that position.