[Gambas-user] WebView - How to show images?

Benoît Minisini g4mba5 at gmail.com
Wed Feb 16 18:20:02 CET 2022


Le 16/02/2022 à 18:11, T Lee Davidson a écrit :
> On 2/16/22 02:55, Fabien Bodard wrote:
>> Le ven. 11 févr. 2022 à 10:58, Martin Belmonte
>> <mbelmonte at belmotek.net> a écrit :
>>>
>>> Hi,
>>> I set the content [1] for a WebView but this don't show the images but a
>>> void frame.
>>> The same content
>>>
>>> [1]
>>> <html>
>>> <head>
>>> </head>
>>> <body style="color:#D3DAE3; background-color:#383C4A; word-wrap:
>>> break-word; -webkit-nbsp-mode: space; -webkit-line-break:
>>> after-white-space;">
>>> <p>Parrafo 1.</p>
>>>
>>> <img width="400" alt ="123-00.png"
>>> src="/home/test/myproject/images/123-00.png"></img>
>> maybe "file:///..." ?
> 
> Good idea, Fabien. But, that doesn't work either.
> 
> I tried it with "WebSettings[WebSettings.LocalContentCanAccessFileUrls] 
> = True", with a root (url), and any other way I could think of.
> 
> Loading the image file seems to work only when retrieved from a server 
> over the http protocol.
> 
> 

Strange. The offline help displayed local images correctly when a 
WebView was used.

Regards,

-- 
Benoît Minisini


More information about the User mailing list