Hello all, I'm getting a GtkTreeview update problem when I place a vbox contains a treeview in a scrolled window as follows, ----------------- window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size (GTK_WINDOW (window), 400, 800); /* create a scrolled window */ scrolled = gtk_scrolled_window_new(NULL, NULL); /* create a vbox in order to add more views in the vbox */ vbox = gtk_vbox_new(FALSE, 0); /* create a vbox because more views could be added */ view = get_one_line_image_view(); gtk_box_pack_start(GTK_BOX(vbox), view, FALSE, FALSE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled), vbox); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(window), scrolled); gtk_widget_show_all (window); model = get_one_line_image_model(); /* After the window is shown, the model should be set to the view*/ gtk_tree_view_set_model(GTK_TREE_VIEW(view), model); ----------------------- There are two exception cases in above example. 1) A hbox is used for adding more treeviews in the scrolled window. 2) Gtk_tree_view_set_model is called after the main window is shown. (To minimize starting time of the main window) In this case, if there are a lot of items, the middle part of tree view is not rendered properly during scrolling. I think if the height of gdkwindow in the treeview is over than 32767px, it seems not like being rendered well. You can test the demo if you replace testtreeview.c in the tests folder of GTK+ with the file attached and compile again. (/gtk+-2.16.6/tests) If you have any ideas of how to fix this problem, please let me know. Thanks in advance, Joone
Attachment:
testtreeview.c
Description: Binary data