Reputation: 972
I would like to add search functionality to my page, with search_next, search_previous, search_close(clear selections) functionality along with this i would like to know the information about search_result_count, current_search_result_index. But there are only two methods exposed in CEF API:
public void Find(int identifier, string searchText, bool forward, bool matchCase, bool findNext);
public void StopFinding(bool clearSelection);
It seems like first we can do search_next and search_previous. I tried following for doing this and able to search backward and forward as expected but when i try to search other word then its not working:
private void previousMouseUp(object sender, MouseButtonEventArgs e)
{
ChromeView.Find(searchIdentifier, searchText, false, isCaseSensitive, true);
}
private void nextMouseUp(object sender, MouseButtonEventArgs e)
{
ChromeView.Find(searchIdentifier, searchText, true, isCaseSensitive, true);
}
And there is no method exposed to get search results count and current search index. I am using 41.0.1.0 version. Please guide me in right direction to achieve my requirements? Kindly don't mind my English;
Upvotes: 2
Views: 3422
Reputation: 4420
The CefSharp.WinForms.Example
has a basic working implementation of Find
.
The CEF API
documentation is http://magpcss.org/ceforum/apidocs3/projects/%28default%29/CefBrowserHost.html#Find%28int,constCefString&,bool,bool,bool%29
Upvotes: 1