Re: Setting float precision in a TreeView
- From: Owen Taylor <otaylor redhat com>
- To: jpavel alum mit edu
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Setting float precision in a TreeView
- Date: 05 Feb 2003 23:36:26 -0500
On Wed, 2003-02-05 at 17:40, Jesse Pavel wrote:
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]