[Gambas-user] webbrowser

Rob sourceforge-raindog2 at ...94...
Wed Apr 29 00:14:28 CEST 2009


On Tuesday 28 April 2009 15:25, glenn wrote:
> can someone please tell me how to get the html from the webbrowser
> control.it is soooooooo easy in VB6 but immposible with gambas
> webbrowser control.i do not wish to have to  highlight then paste as
> this sucks.

I just looked in the WebBrowser component source, and it seems someone 
wrote a SelectAll property, but it's commented out, meaning there is no 
programmatic way in current Gambas versions to select the whole page and 
then retrieve it using Selection.  I may try to uncomment it and recompile 
to see what the problem was, and package it up if it works, but that won't 
help users with unmodified Gambas installations.

There are other methods for retrieving the HTML from the KHTMLPart widget 
on which the WebBrowser control is based, but for whatever reason 
(probably the original author simply didn't need it) they were never 
exposed.  I assume that the KHTMLPart API has changed significantly for 
KDE4, so the WebBrowser component will have to be reimplemented, and maybe 
whoever does that will provide access to the HTML text.

I'm not sure why this is, but if you need programmatic access to the 
contents of a web browser control, until some future Gambas release it 
seems you'll have to go back to VB.

Rob




More information about the User mailing list