[Gambas-user] WebView Foreground how-to ??

Martin mbelmonte at belmotek.net
Wed Mar 10 10:43:19 CET 2021


Hi.

Someone could tell me please if is possible change the background 
foreground colors in the webview.
I leave this simple example to do the test.
Also, on my desktop, which has a dark theme, it doesn't look properly, 
because the text is black and it should be white (like the rest of the 
controls)

Regards

Martín.

https://imgur.com/frRhrWF.png

Public Sub Form_Open()
   WebView1.HTML = "<!DOCTYPE html><html> <head> <title>Declaración de 
derechos humanos</title> </head> <body> <h2>Artículo 1.</h2> <p>Todos 
los seres humanos nacen libres e iguales en dignidad y derechos...    
<h2>Artículo 2.</h2> <p>Toda persona tiene todos los derechos y 
libertades proclamados...</p> </body> </html>"
End
Public Sub ToggleButtonsGroup_Click()
   Select Last.tag
     Case 1
       WebView1.Foreground = Color.DarkBlue
       WebView1.Background = Color.Cyan
     Case 2
       WebView1.Foreground = Color.DarkRed
       WebView1.Background = Color.Yellow
     Case 3
       WebView1.Foreground = Color.Foreground
       WebView1.Background = Color.Background
   End Select
End



More information about the User mailing list