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

T Lee Davidson t.lee.davidson at gmail.com
Wed Feb 16 18:11:49 CET 2022


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.


-- 
Lee


More information about the User mailing list