sorry,maybe this is so simple question,
I found the answer at last..

GtkTreePath *path;
        path = gtk_tree_model_get_path(GTK_TREE_MODEL(liststore), &iter2);
        gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(user_data), path, NULL,
                               FALSE, 0.0, 0.0);
        gtk_tree_path_free(path);


that will be OK

2005/8/8, apple dragon <[EMAIL PROTECTED]>:
> a treeview(datasouce is liststore) in a scrolled window
> and the treeview is sort automatic.
> 
> // gtk_container_add (GTK_CONTAINER (scrolledwindow), dirlist);
> 
> when I insert one item into the dirlist
> 
>         /* append the selected item into the list of the right */
>         gtk_list_store_append(liststore,&iter);
>         gtk_list_store_set(liststore,&iter,0,curselectedpath,-1);
>         gtk_tree_selection_select_iter(listselection,&iter);
> 
> and make this item selected.
> 
> the question is when the item insert is NOT in the current page of
> the scrolled window,how can I make the window auto scrolled and let
> the item insert be in the current page. thanks a lot..
>
--
nautilus-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nautilus-list

Reply via email to