#include <gtkmm.h>

class ExampleWindow : public Gtk::Window
{
public:
  ExampleWindow();

  class TestColumns : public Gtk::TreeModelColumnRecord
  {
  public:
    TestColumns() { add(col); }

    Gtk::TreeModelColumn<short> col;
  } model_columns;

  Glib::RefPtr<Gtk::ListStore> refModel;
  Gtk::TreeView m_TreeView;
};

ExampleWindow::ExampleWindow()
{
    set_default_size(400, 200);

    refModel = Gtk::ListStore::create(model_columns);
    m_TreeView.set_model(refModel);

    Gtk::ListStore::iterator it = refModel->append();
    Gtk::TreeModel::Row row = *it;
    (row)[model_columns.col] = 1;

	/* If not editable, it works */
    m_TreeView.append_column_numeric_editable("index", model_columns.col, "%d");

    add(m_TreeView);

    show_all_children();
}

int main(int argc, char *argv[])
 {
  Gtk::Main kit(argc, argv);

  ExampleWindow test_window;
  kit.run(test_window);
}
