tags:

views:

30

answers:

1

Hi, i am using webkitgtk+ to render HTML files. I am trying to render multiple HTML files into same page (say same gtkscrolledwindow ). What i did is, i put a vbox to gtkscrolledwindow as viewport and put Webkitwebviews to vbox, one after the other. But the problem is the HTML files are no more reflowable. I want to retain reflowable property of HTML files. Can anyone Help me? my code:

GtkWidget *vbox= gtk_vbox_new(0,0);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window),vbox);

WebKitWebView  *web_view_1 = WEBKIT_WEB_VIEW (webkit_web_view_new ());
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view_1), "myfile_1.html");
WebKitWebView  *web_view_2 = WEBKIT_WEB_VIEW (webkit_web_view_new ());
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view_2), "myfile_2.html");

gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(web_view_1),0,0,0);
gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(web_view_2),0,0,0);

is it possible to put multiple pages to same WebkitwebView ?

A: 

I'm not sure what you mean by reflowable, but you can write your own HTML consisting of two frames containing myfile_1.html and myfile_2.html, put that HTML code into a string, and load it into the web view with webkit_web_view_load_string().

ptomato