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
public interface IncrementalSearch
public interface class IncrementalSearch
type IncrementalSearch =  interface end
public interface IncrementalSearch

The IncrementalSearch type exposes the following members.


  Name Description
Public property DTE Gets the top-level extensibility object.
Public property IncrementalSearchModeOn Gets a value indicating whether an ISearch is being performed.
Public property Pattern Gets the characters being processed in the current ISearch.



  Name Description
Public method AppendCharAndSearch Adds a character to the ISearch pattern and performs a search for the new string.
Public method DeleteCharAndBackup Removes one character from the search pattern and moves the selection back to the previous match.
Public method Exit Stops the current ISearch and returns the editor to its basic behavior.
Public method SearchBackward Searches for the current pattern from the current position to the beginning of the document.
Public method SearchForward Searches for the current pattern from the current position to the end of the document.
Public method SearchWithLastPattern Repeats the current ISearch without changing the pattern
Public method StartBackward Starts a backward search.
Public method StartForward Starts a forward search.



Sub testIS()
    ' Set variables for text pane.
    Dim tp As EnvDTE80.TextPane2
    tp = CType(DTE.ActiveDocument.ActiveWindow.Object.ActivePane, _
    ' Start an incremental search forward from
    ' the current insertion point in the document.
    ' Add the character "a" to the search pattern.
    ' Perform incremental search using the pattern ("a").
    ' After the search, exit incremental search mode.
End Sub

See Also


EnvDTE80 Namespace

Other Resources

How to: Search for Text Incrementally

How to: Search a Document Incrementally