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

Re: Search methods added to the WebView control


Am 18.04.25 um 00:34 schrieb Benoît Minisini:
Two more things:
1. Using the Find()-method without arguments is supposed to erase all marked hits. This works with the exemption of the first hit, which remains marked in gray color. My current workaround is to reload the HTML page but this takes time and is clearly visible. It would be perfect if the Find() method (without arguments) erases also the first hit.
It's internal to the browser. I guess it selects the first text found, and I guess you may have different behaviours between QT WebView and WebkitGTK. Maybe running a few javascript will allow you to unselect all selected text?
I am no JS geek and have no clue, what I have to look for (CSS class, HTML Tag ..?). I tried several AI proposals without success so far. Can someone help?
2. Currently we load the HTML into the WebView (gb.qt5.webview) with

     WebViewDocView.Url = "file:///" & Application.Path &/ "program_doc/ doc.html"

This works fine during development time but as a Gambas executable or AppImage executed outside of the program development path it fails with the error ERR_FILE_NOT_FOUND displayed in the WebView. Is there a way to access the HTML file with all css files and linked images as program resource or do we have to copy all files to an external system path before loading the HTML file?
Only the gambas interpreter can read files inside the executable. All other programs and libraries must work on a copy of these files.

When you develop a program, you must never access files in your project directly. It won't work when you make an executable.

As my PDF-Help-solution also works in an executable I still struggle to determine when it is appropriate to use an external file instead of an internal resource. An external file seems to be required in all cases where the path is passed directly to an external program/ library. How can we know whether it's such a case or not?

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>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>