Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

tut-treeview-selection-doubleclick

Double-Clicks on a Row

Catching double-clicks on a row is quite easy and is done by connecting to a tree view's "row-activated" signal, like this:

view.signal_connect("row-activated") do |view, path, column|
  puts "Row #{path.to_str} was clicked!"

  if iter = view.model.get_iter(path)
    puts "Double-clicked row contains name #{iter[0]}!"
  end
end
Last modified:2005/05/03 02:50:06
Keyword(s):
References:[tut-treeview]