Re: Problem with GtkTreeSelection
- From: John Cupitt <jcupitt gmail com>
- To: Bob Caryl <bob fis-cal com>
- Cc: gtk-list gnome org
- Subject: Re: Problem with GtkTreeSelection
- Date: Tue, 21 Dec 2004 18:18:33 +0000
Hi,
On Tue, 21 Dec 2004 10:03:23 -0600, Bob Caryl <bob fis-cal com> wrote:
> pressing): I cannot programmatically select a row in a GtkTreeView (a simple
> list box analogy w/o children) using the gtk_tree_selection_select_path
> function.
I do this with:
path = gtk_tree_model_get_path( GTK_TREE_MODEL( store ), &iter );
gtk_tree_view_expand_to_path( GTK_TREE_VIEW( tree ), path );
gtk_tree_view_set_cursor( GTK_TREE_VIEW( tree ), path, NULL, FALSE );
gtk_tree_path_free( path );
Given an iter, this opens that part of the tree and selects the row.
One thing that bit me: if you have callbacks which spot select
actions, they will be triggered by this. You may need to block those
signals before calling these functions.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]