Re: A numbered column in a Gtk::TreeStore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bryan Forbes wrote:

>	I'm working on audio support in Coaster and I have a Gtk::ListView to
>view a Gtk::TreeStore of tracks for an audio disc the user is creating.
>I need a column for the track number that automatically updates with the
>correct track number.
>
>  
>

See
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func

In the callback you can call gtk_tree_model_get_path to get the path,
and then call gtk_tree_path_get_indices on the path to determine the
index of the row.
Then you can use that to set the text to be displayed by the column
renderer.
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux