GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Jul 31, 2014 9:29 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Precision of the data of GtkTreeViewColumn
PostPosted: Fri Jun 08, 2007 8:27 am 
Offline
Familiar Face

Joined: Tue Jan 23, 2007 6:13 pm
Posts: 34
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 08, 2007 12:08 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: gabriellg, Google [Bot], Google Adsense [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group