[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Setting float precision in a TreeView
- From: Jesse Pavel <jpavel alum mit edu>
- To: otaylor redhat com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Setting float precision in a TreeView
- Date: Fri, 7 Feb 2003 13:38:22 -0500
Ah, thank you--I got it to work that way.
Take care,
Jesse
>
> > Hello,
> >
> > I'm using a TreeView, ListStore, and CellRendererText to display
> > float values (G_TYPE_FLOAT), and currently the renderer shows
> > several digits of precision, while I would like to have it show
> > only 2 digits of precision. Is there some way I can configure
> > ther renderer to use fewer digits?
>
> What you need to is to use gtk_tree_view_insert_column_with_data_func()
> and do the coversion from float to string yourself (with,
> say, g_strdup_printf()).
>
> Regards,
> Owen
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]