editorsearchview end of search notification

SyntaxEditor for Silverlight Forum

Posted 6 years ago by Al
Version: 13.1.0150
Avatar

Is there any way to detect when the user has searched through the entire document with editorSearchView and there are no more matches.  Currently clicking find after the last result (or with no results)  does nothing.  I would like to present a notification like Visual Studio w/ a message like "The following specified text was not found:..." or "No more occurences found in the specified documents."

 

Thanks,

 

-Al

Comments (4)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Al,

Unfortunately it doesn't look like we report if the search start offset was passed.  The result set does indicate if wrapping was performed though (wrapped past the end of the document).  We'll make a note to look into this in the future.

For now you could check the result set to know if any occurrences were found.  And perhaps store the snapshot offset of the first time you find a match.  Then as you progress through subsequent matches, if a match passes the snapshot offset again, you could tell the user that they passed the search start offset.


Actipro Software Support

Posted 6 years ago by Al
Avatar

I only see the SearchResultSet as available when programatically searching (not using editorSearchView). Am I missing how to reference the results in the docs or will I have to write a search/replace dialog by hand?

 

Thanks.

 

-Al

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Al,

There is a SyntaxEditor.ViewSearch event available that passes the result set.  You can see how we use that in the SearchFindResults QuickStart.


Actipro Software Support

Posted 6 years ago by Al
Avatar

Thanks ResultSet.Wrapped was exactly what I needed.

The latest build of this product (v2018.1 build 0232) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.