Re: gtktreeview and doubles
- From: Murray Cumming <murrayc murrayc com>
- To: "Martin (OpenGeoMap)" <martin opengeomap org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtktreeview and doubles
- Date: Wed, 30 Apr 2008 12:16:50 +0200
On Wed, 2008-04-30 at 10:49 +0200, Martin (OpenGeoMap) wrote:
Hi all:
ItÂs posible edit the cellrender for doubles??
Always put 6 decimals. Can i modify that??
Any tips appreciated.
You can use gtk_tree_view_column_set_cell_data_func() to change how data
is displayed in your cell renderer. For instance, you can set the "text"
property with the result of a sprintf() call:
http://library.gnome.org/devel/gtk/unstable/GtkTreeViewColumn.html#gtk-tree-view-column-set-cell-data-func
gtkmm even has a Gtk::TreeView::append_column_numeric() method to make
this easier:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeView.html#e6fc0051cc178bfacea2dec27c2d5a58
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]