GtkHtml and Glade

Hi, there is a way to use the gtkhtml component with glade / phpgtk.

In glade, create a GtkScrolledWindow and add a Custom component with gtk_html_new as creation function name.

The following php code produced a segmentation fault, on my Debian :(

// $html is some text variable that
// contains html code
$html = "<html><body>foo</body></html>";

// generate a glade layout from
// the glade xml file
$layout = &new GladeXml("");

// retrieve the Custom component named "htmlcomponent"
$gtkhtml = &$layout->get_widget("htmlcomponent");

// gtkhtml component MUST have a content
// or the program will generate a
// segmentation fault (another one yes)
$stream = &$gtkhtml->begin();

$gtkhtml->write ($stream, $html, strlen($html) );
$gtkhtml->end ($stream, GTK_HTML_STREAM_OK);

To get rid of this segfault, I removed the GtkViewPort widget from the produced glade xml (I found no way to remove it from the glade interface).

The glade file is alway usuable within glade so you can modify the interface...

I hope this will help some coders :)

For a full list of gtkhtml callbacks and functions, refer to gtkhtml.h file in gtkhtml-dev packages.

NOTE : This comment was taken directly from


GtkHtml-3.0.dll missing error

Hi please give me the exact path where i can download the GtkHtml-3.0.dll file

i get following error when i try to display HTML content in Scrolled Window .

Please help me out.

Opzioni visualizzazione commenti

Seleziona il tuo modo preferito per visualizzare i commenti e premi "Salva impostazioni" per attivare i cambiamenti.