IncrementalSearch Interface
TOC
Collapse the table of content
Expand the table of content

IncrementalSearch Interface

 

Provides access to the incremental search (ISearch) capability of the text editor.

Namespace:   EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

[GuidAttribute("C5BEE6D8-ED45-4317-96BF-97EB88EA3A07")]
public interface IncrementalSearch

NameDescription
System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyIncrementalSearchModeOn

Gets a value indicating whether an ISearch is being performed.

System_CAPS_pubpropertyPattern

Gets the characters being processed in the current ISearch.

NameDescription
System_CAPS_pubmethodAppendCharAndSearch(Int16)

Adds a character to the ISearch pattern and performs a search for the new string.

System_CAPS_pubmethodDeleteCharAndBackup()

Removes one character from the search pattern and moves the selection back to the previous match.

System_CAPS_pubmethodExit()

Stops the current ISearch and returns the editor to its basic behavior.

System_CAPS_pubmethodSearchBackward()

Searches for the current pattern from the current position to the beginning of the document.

System_CAPS_pubmethodSearchForward()

Searches for the current pattern from the current position to the end of the document.

System_CAPS_pubmethodSearchWithLastPattern()

Repeats the current ISearch without changing the pattern

System_CAPS_pubmethodStartBackward()

Starts a backward search.

System_CAPS_pubmethodStartForward()

Starts a forward search.

Sub testIS()
    ' Set variables for text pane.
    Dim tp As EnvDTE80.TextPane2
    tp = CType(DTE.ActiveDocument.ActiveWindow.Object.ActivePane, _
    TextPane2)
    ' Start an incremental search forward from
    ' the current insertion point in the document.
    tp.IncrementalSearch.StartForward()
    ' Add the character "a" to the search pattern.
    tp.IncrementalSearch.AppendCharAndSearch(Asc("a"))
    ' Perform incremental search using the pattern ("a").
    tp.IncrementalSearch.SearchWithLastPattern()
    ' After the search, exit incremental search mode.
    tp.IncrementalSearch.Exit()
End Sub
Return to top
Show:
© 2016 Microsoft