Em Tue, 28 May 2002 17:33:28 -0300, Gustavo Noronha Silva <kov debian org> escreveu:
The item is added to the top of the view, but it is hiden, because the scrolled window does not scroll to the top... any hint on how to show it?
I got the behavior I wish with this: /* adds to the list */ gtk_list_store_prepend (tree_model, &ti); set_item_into_row (tree_model, &ti, &todo_item); path = gtk_tree_model_get_path (GTK_TREE_MODEL(tree_model), &ti); gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE); gtk_tree_path_free (path); while (gtk_events_pending()) gtk_main_iteration (); vadj = gtk_scrolled_window_get_vadjustment (mw->swindow1); gtk_adjustment_set_value (vadj, 0); gtk_adjustment_value_changed (vadj); But it seems quite hackish to me... is there a better way? This seems to me like a wrong behavior in gtk_scroll_window shouldn't it scroll to show the row that is selected? []s! -- kov debian org: Gustavo Noronha <http://people.debian.org/~kov> Debian: <http://www.debian.org> * <http://debian-br.cipsga.org.br>
Attachment:
pgpNgHLdZGhhw.pgp
Description: PGP signature