Table of Contents

Property Scrolling

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

Scrolling

Represents an object that implements IScrolling interface containing properties and methods that describe scrolling behaviour of the control.

[TypeConverter(typeof(ExpandableObjectConverter))]
public virtual IScrolling Scrolling { get; set; }

Property Value

IScrolling

Examples

Here is how to use a Scrolling 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.LoadFile("myfile.txt");
        syntaxEdit1.Scrolling.Options = Alternet.Editor.ScrollingOptions.AllowSplitVert | Alternet.Editor.ScrollingOptions.AllowSplitHorz | Alternet.Editor.ScrollingOptions.ShowScrollHint | Alternet.Editor.ScrollingOptions.VerticalScrollBarAnnotations;
        syntaxEdit1.Scrolling.Annotations.EnabledAnnotationKinds = Alternet.Editor.ScrollBarAnnotationKinds.Bookmark | Alternet.Editor.ScrollBarAnnotationKinds.Error | Alternet.Editor.ScrollBarAnnotationKinds.SearchResult;
    }
}

Here is how to use a Scrolling 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.LoadFile("myfile.txt")
        syntaxEdit1.Scrolling.Options = Alternet.Editor.ScrollingOptions.AllowSplitVert Or Alternet.Editor.ScrollingOptions.AllowSplitHorz Or Alternet.Editor.ScrollingOptions.ShowScrollHint Or Alternet.Editor.ScrollingOptions.VerticalScrollBarAnnotations
        syntaxEdit1.Scrolling.Annotations.EnabledAnnotationKinds = Alternet.Editor.ScrollBarAnnotationKinds.Bookmark Or Alternet.Editor.ScrollBarAnnotationKinds.[Error] Or Alternet.Editor.ScrollBarAnnotationKinds.SearchResult
    End Sub
End Class

Remarks

Scrolling specifies the appearance of the SyntaxEdit control's scrollbars and provides additional options such as displaying Annotations or using split or custom scrolling buttons.