Re: A numbered column in a Gtk::TreeStore



That worked!  Thanks!

On Tue, 2005-03-29 at 11:07 +0900, Vadim Berezniker wrote:
> 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.
-- 
======================================================================
Bryan Forbes
bryan reigndropsfall net
http://www.reigndropsfall.net

"It does not take a majority to prevail, but rather an irate, tireless
minority keen to set brush fires in people's minds."
        - Samuel Adams, an architect of the Constitution

Key fingerprint = 3D7D B728 713A BB7B B8B1  5B61 3888 17E0 70CA 0F3D

Attachment: signature.asc
Description: This is a digitally signed message part



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