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

    Show / Hide Table of Contents

    SearchDialog Property

    SearchDialog

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

    Declaration
    [Browsable(false)]
    public virtual ISearchDialog SearchDialog { get; set; }
    Property Value
    Type Description
    ISearchDialog
    Implements
    ISearch.SearchDialog
    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.

    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
    
    In This Article
    Back to top Copyright AlterNET Software Download PDF