Re: gtk_list and double type



Olivier Mougin <themac club-internet fr> writes:

Hello all,

In my list_store i've got strange thinks

all field of type double appear like: 2.50000 or 3,000000 
how can i do for remove all this 0 and have think like that:
2.5

You probably want to use:

gint gtk_tree_view_insert_column_with_data_func  (GtkTreeView               *tree_view,
                                                  gint                       position,
                                                  const gchar               *title,
                                                  GtkCellRenderer           *cell,
                                                  GtkTreeCellDataFunc        func,
                                                  gpointer                   data,
                                                  GDestroyNotify             dnotify);

Instead of insert_column_with_attributes(). Your "GtkTreeCellDataFunc" can
then do whatever number => string conversion it wants.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]