1

I am using a Gtk::TreeView to create a tree view in gtkmm. It has two columns. The first column has two types of icons in different rows. One icon is used to add an element to the tree and the second is used to delete the element from the tree.

I have accessed the column number of the first column and added tooltip to the icons. However, I need different tooltips for both the icons.

A variable COL_ADD is used to compare the column using:

if (col == _tree.get_column(COL_ADD-1)) {
    set_tooltip_text(_("Add selection to set"));
}

where col is Gtk::TreeViewColumn.

Since both the icons belong to same column, so they are getting the same tooltip. How do I differentiate to get the corresponding rows of icons to add different tooltips to them?

Kamalpreet Grewal
  • 822
  • 1
  • 13
  • 28

1 Answers1

0

I guess that Gtk::TreeView::set_tooltip_cell() is what you need: https://developer.gnome.org/gtkmm/stable/classGtk_1_1TreeView.html#ae7cc8fde03c481de81fc9d13e34bff98

murrayc
  • 2,103
  • 4
  • 17
  • 32