[Gtk-sharp-list] What's the best way to display fractions in a TreeView

Chris Howie cdhowie at gmail.com
Sat Jul 25 00:50:57 EDT 2009

On Fri, Jul 24, 2009 at 6:19 PM, Slug<toddglodek at hotmail.com> wrote:
> I'm really having a lot of trouble figuring out how I should go about
> displaying a bunch of numeric values as fractions in a TreeView.  If I
> convert them to strings and load them into the model, then the sorting is
> all out of order when I click on the column header.  It looks like this
> (which is wrong):
>     1    1/4
>     11  1/2
>     2    3/4

You might look at Gtk.TreeSortable.SetDefaultSortFunc.  Most models
implement the TreeSortable interface.

Chris Howie

More information about the Gtk-sharp-list mailing list