[MonoDevelop] cant get WebBrowser/Gecko-sharp/Webkit-Sharp to show up in monodevelop 2.4 on ubuntu 10.10 64bit
Derek JW Cahusac de Caux
derek at azuregulf.com
Sun Nov 21 07:44:59 EST 2010
Hi Marc
This might help - as an exercise, I've written a simple RSS news feed
reader that will display the web page for the news item - code snippets
as below:
My Monodevelop project has 3 bits of code
1) Main.cs which just invokes RSSreader;
2) then, in RSSreader.cs this code:
using WebKit;
namespace myRSS
// then in whatever method you want to invoke the browser:
// view webpage for news item (or 'home' page for this RSS
feed)
ErrorMessageLabel.Text = "";
if (Active_GUID != "") {
// invoke the WebKit browser view (cool!)
new NewsWebView (Active_GUID);
} else {
ErrorMessageLabel.Text = "no GUID url associated with
this item";
}
3) and in NewsWebView.cs the complete code is:
using System;
using Gtk;
using WebKit;
namespace myRSS
{
public partial class NewsWebView : Gtk.Window
{
public NewsWebView (string GUIDurl) : base(Gtk.WindowType.Toplevel)
{
this.Build ();
// System.Console.WriteLine("GUID url is : " + GUIDurl + "<<");
WebView webView = new WebView ();
webView.Open (GUIDurl);
WebViewScrolledWindow.Add (webView);
this.ShowAll ();
}
}
}
That's it. And, of course, as I think you've figured out, you need to
add Webkit to your project's References and you need to design a simple
GUI (scrolled) window for the code that actually calls Webkit.
Cheers, Derek
Derek JW Cahusac de Caux
Marc Seiler emailed on 21/11/10 08:10:
> I'm not getting any exceptions... I just couldn't find how to use
> webkit or gecko but I figured it out sorta. I figured out you have to
> add a reference to it in the solution. But I still don't have any
> thing in the designer part to put a webview in a container. zi had to
> do that by hand so I think I am ok no.
>
> Thank you,
> Marc Seiler
> 863-354-0252
> digital-focus.us
>
>
>
> On Sun, Nov 21, 2010 at 2:47 AM, Sergey Lobko-Lobanovsky
> <serge.lobanovsky at gmail.com> wrote:
>
>> Would help if you show exceptions are getting, if any.
>>
>> On 11/21/10, Marc Seiler<mseiler at gmail.com> wrote:
>>
>>> I cant seem to get a widget for WebBrowser or be able to do uses
>>> Gecko; no matter what I've done. Short of compiling monodevelop from
>>> source. I havent done that yet because I didnt think that was
>>> required. I have installed every gecko/webkit/mozilla package I can
>>> find and I've put libgtkembedmoz.so in several directories to see if
>>> monodevelop could find it and I cant seem to get it to work.
>>>
>>> I am very new to c# programming and even newer to mono/monodevelop. I
>>> was unable to find any tutorials on making a simple "web browser" in
>>> monodevelop and thats basically what I want to do. Can someone please
>>> help me?
>>>
>>>
>>> Thank you,
>>> Marc Seiler
>>> 863-354-0252
>>> digital-focus.us
>>> _______________________________________________
>>> Monodevelop-list mailing list
>>> Monodevelop-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>>>
>>>
>>
>> --
>> Sergey Lobko-Lobanovsky
>> CEO @ Maygem/Bitfold
>>
>> Phone: +375 29 6677116
>> Skype: arilou_camper
>> Website: www.maygem.net, www.bitfold.net
>> LinkedIn: www.linkedin.com/in/sergeyl
>>
>>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20101121/6c4d690b/attachment-0001.html
More information about the Monodevelop-list
mailing list