Re: How to make a TreeView use markup?

Torsten Luettgert wrote:

> I'm using Gtk::TreeViews with ListStore model a lot.
> Now, I wanted to use pango markup in some columns, but
> couldn't get it to work. I don't know too much about
> CellRenderers etc., just adding the columns like
>   treeviewTitel->append_column( "Titel", model_TitelListe.m_titel );
> where model_TitelListe is an instance of a class derived
> from Gtk::TreeModel::ColumnRecord, and m_titel is a
> Gtk::TreeModelColumn<string>.

Snippet from my program:

  Gtk::CellRendererText&    name_renderer = *manage (new Gtk::CellRendererText ());
  Gtk::TreeViewColumn&	    name_column   = *manage (new Gtk::TreeViewColumn ("", name_renderer));

  name_column.add_attribute (name_renderer.property_text (),   _category_columns._name);
  name_column.add_attribute (name_renderer.property_weight (), _category_columns._name_weight);

  _categories_tree->append_column (name_column);

So I guess that `.property_markup ()' should do the trick, but I didn't


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