Monday, November 10, 2008

GeckoFX (Firefox) WebBrowser Control from IronPython

A Japanese blogger shows off how to use the GeckoFX (Firefox) Windows Forms WebBrowser control from IronPython. This allows you to embed webpages in Windows Forms applications using the Gecko rendering engine.
The example code uses the winforms sample that comes with IronPython:

import sys
import winforms
from System.Windows.Forms import *
f = Form()
f.Text = "GeckoFX"
import clr
from Skybound.Gecko import *
Xpcom.Initialize("(Firefox 3")
browser = GeckoWebBrowser()
browser.Parent = f
browser.Dock = DockStyle.Fill

No comments:

Post a Comment

Note: only a member of this blog may post a comment.