Hi,
Is there a way to enable the Find option in TChromium ? Is the feature Chrome has when you hit Ctrl+F, it shows a dialog to type a search term to be find in the current url.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Enabled find ?
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Enabled find ?
HI,
CEF doesn't include a search box or any other user interface to search for text. However, TChromium has 2 procedures to let the user find text in a web page :
And these are the comments for "StopFinding" :
You can add a TEdit to your app to search for any text and call those functions to highlight the findings.
CEF doesn't include a search box or any other user interface to search for text. However, TChromium has 2 procedures to let the user find text in a web page :
- TChromium.Find
- TChromium.StopFinding
Code: Select all
///
// Search for |searchText|. |identifier| must be a unique ID and these IDs
// must strictly increase so that newer requests always have greater IDs than
// older requests. If |identifier| is zero or less than the previous ID value
// then it will be automatically assigned a new valid ID. |forward| indicates
// whether to search forward or backward within the page. |matchCase|
// indicates whether the search should be case-sensitive. |findNext| indicates
// whether this is the first request or a follow-up. The cef_find_handler_t
// instance, if any, returned via cef_client_t::GetFindHandler will be called
// to report find results.
///
Code: Select all
///
// Cancel all searches that are currently going on.
///
-
- Posts: 513
- Joined: Thu Aug 10, 2017 12:40 pm
Re: Enabled find ?
That's great, thank you !
Re: Enabled find ?
Boa tarde,
Gostaria de saber se tem com verificar via código se o sistema encontrou resultado.
Pergunto porque visualmente ele marca o texto encontrado, mas a busca não retorna uma resposta de verdadeiro ou falso.
Obrigado.
Gostaria de saber se tem com verificar via código se o sistema encontrou resultado.
Pergunto porque visualmente ele marca o texto encontrado, mas a busca não retorna uma resposta de verdadeiro ou falso.
Obrigado.
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Enabled find ?
Hi,
Use the TChromium.OnFindResult event to know more details about the search results.
Read this for all the details about that event :
https://magpcss.org/ceforum/apidocs3/pr ... ndler.html
Use the TChromium.OnFindResult event to know more details about the search results.
Read this for all the details about that event :
https://magpcss.org/ceforum/apidocs3/pr ... ndler.html