Table of Contents

Property SearchDialog

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

SearchDialog

Gets or sets a dialog box allowing to search for the text or replace it.

[Browsable(false)]
public virtual ISearchDialog SearchDialog { get; set; }

Property Value

ISearchDialog

Examples

Here is how to use a SearchDialog 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.SearchDialogAppearance = Alternet.Editor.SearchDialogAppearance.PopupPanel;
        syntaxEdit1.SearchDialog.SearchSettings.SearchOptions |= Alternet.Editor.TextSource.SearchOptions.CaseSensitive | Alternet.Editor.TextSource.SearchOptions.FindTextAtCursor;
    }
}

Here is how to use a SearchDialog 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.SearchDialogAppearance = Alternet.Editor.SearchDialogAppearance.PopupPanel
        syntaxEdit1.SearchDialog.SearchSettings.SearchOptions = syntaxEdit1.SearchDialog.SearchSettings.SearchOptions Or Alternet.Editor.TextSource.SearchOptions.CaseSensitive Or Alternet.Editor.TextSource.SearchOptions.FindTextAtCursor
    End Sub
End Class

Remarks

SearchDialog provides search and replace capabilities to the SyntaxEdit control.

SearchSettings can be used to customise search and replace behavior.

By default, the search dialog is displayed as a popup panel at the top-right corner of the SyntaxEdit control. You can override it to be displayed as a separate dialog box by setting the SearchDialogAppearance property.