Re: GtkListStore and G_TYPE_FLOAT

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

 



Hi.
I think there is no way of specifying the number of decimal places inGtkCellRendererText. So one solutions you've already mentioned is toadd additional G_TYPE_STRING column with floats converted to strings.The other would be to use cell data function which would transformfloats on the fly.
Sample data function can be seen here:http://scentric.net/tutorial/sec-treeview-col-celldatafunc.html

2009/1/18 Harinandan S <harinandans@xxxxxxxxx>:> Hi All,> When I create a list store to store float with G_TYPE_FLOAT, and view it in> GtkTreeView, the number of significant digits after decimal points is around> 6. My data have a max of 2 digits after decimal point and hence it looks bad> in GtkTreeView. Is there any way to set the number of digits after decimal> point or I've to use G_TYPE_STRING and convert float to string and vice> versa?> Regards,> Harinandan S>> _______________________________________________> gtk-list mailing list> gtk-list@xxxxxxxxx> http://mail.gnome.org/mailman/listinfo/gtk-list>>


-- Tadej Borovšaktadeboro@xxxxxxxxxxxxxxxxxxxxxxx@gmail.com_______________________________________________gtk-list mailing listgtk-list@xxxxxxxxxxxxx://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux