 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
hydra Familiar Face
Joined: 23 Jan 2007 Posts: 35
|
Posted: Fri Jun 08, 2007 8:27 am Post subject: Precision of the data of GtkTreeViewColumn |
|
|
| I use GtkTreeView to show some data in columns, the data has type G_TYPE_DOUBLE. The problem is that is see the numbers with the full precision. That means .000000 after the floating point. So, how can I specify the exact precision that i need? |
|
| Back to top |
|
 |
openldev Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 376 Location: State College, Pennsylvania
|
Posted: Fri Jun 08, 2007 12:08 pm Post subject: |
|
|
| You must use a cell data function, which is called every time a row is created. You can control the precision with this. Basically, use gtk_tree_view_column_set_cell_data_func() to add a cell data function to a tree view column. Then, you can customize the displayed text in that function. |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|