[Gtk-sharp-list] WebKit-sharp, simple example

Doug Blank doug.blank at gmail.com
Thu Feb 14 21:13:17 UTC 2013


Bounty on stack overflow for this question:

http://stackoverflow.com/questions/14814421/gtk-based-mono-webbrowser-on-windows

-Doug

On Sun, Feb 10, 2013 at 10:49 PM, Doug Blank <doug.blank at gmail.com> wrote:
> Trying to get Gtk webkit-sharp on Windows and Mac working, but no
> luck. Everything appears to be loading correctly, but I haven't been
> able to see any output in a window yet. browser.Initialized is true.
>
> Here is a very simple example (maybe too simple).
>
> public static void Main (string[] args)
> {
>     Gtk.Application.Init ();
>     Gtk.Window win = new Gtk.Window ("Title");
>     Mono.WebBrowser.IWebBrowser browser =
>         Mono.WebBrowser.Manager.GetNewInstance(Mono.WebBrowser.Platform.Gtk);
>     browser.Load(win.Handle, 500, 250);
>     win.ShowAll ();
>     GLib.Timeout.Add( 500, delegate {
>         browser.Navigation.Go ("http://google.com/");
>         return false;
>     });
>     Gtk.Application.Run ();
> }
>
> which compiles and runs, but I don't see any output. Any ideas?
>
> -Doug


More information about the Gtk-sharp-list mailing list