[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search methods added to the WebView control


Am 09.04.25 um 09:41 schrieb Claus Dietrich:
Am 08.04.25 um 22:12 schrieb Benoît Minisini:
Hi,
In the last commit, I added three methods for searching text in the contents of a WebView (in GTK+3, QT5 and QT6 webview components). 'Find(<string>, <options>)' starts a new search and highlights all the found strings. It returns the number of matches. The only option supported in common by Qt and WebKitGTK+ is case sensitivity. WebKitGTK+ have others, but not Qt. What a pity!
'FindNext()' and 'FindPrevious()' will then search forward or backward.
If you want to end the search and hide the highlighting, just call 'Find()' with no arguments. Enjoy!

These new Find methods will clearly be an enormous simplification for Gambassers - many thanks for that.

Best Regards, Claus

I tried to implement the new WebView-Find()-method in new Gambas-Book-app. Due to the different search concept the code of the previous WebKit-version had to be rewritten and GUI had to be modified. This is OK, but before publishing it I like to sort out this issue:

When I use the new Find() method without <options> it is ignoring the case, which is OK. When I use the Find() method with the new constant "FindIgnoreCase" as <options> the Find()-method DOES NOT ignore the case. This is an inverted (and wrong) logic. The constant should have been called "FindCaseSensitive" or just "CaseSensitive". Or is there a misunderstanding?

Best regards

Claus





Follow-Ups:
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>