I'm trying to catch the click event on a row
For some reason this only works on double click.
@tree.signal_connect("row-activated") do |view, path, column|
puts "Row #{path.to_str} was clicked!"
end
How can I catch just a single click ?
I'm trying to catch the click event on a row
For some reason this only works on double click.
@tree.signal_connect("row-activated") do |view, path, column|
puts "Row #{path.to_str} was clicked!"
end
How can I catch just a single click ?
row-activated is the double-click signal. Think of "activated" as "user wants to edit this or do something with it." If you're using VisualRuby, then any GTK object with a show() method should be editable - it'll pop up its window when double-clicked.
I agree with the answer above - a single click changes the cursor, so use cursor-changed.
I would say :
@tree.signal_connect("cursor-changed") { |w,e| selObj(w,e) }