W
Witold Rugowski
Hi!
I have canvas items (TkcLine to be exact) and I need to bind some code
executed on click. I use code similar to this:
line = TkcLine.new($root, arg, :fill => '#000', :width => 2)
line.bind("Button-1") {|e|
#some actions
}
It works, but I dont know how to get which item was clicked.
I have bunch of lines in one canvas. Event passed to code does refers
only to widget which was clicked, but this is canvas itself, not
particular canvas item. Is possible to know which line was clicked?
Best regards,
I have canvas items (TkcLine to be exact) and I need to bind some code
executed on click. I use code similar to this:
line = TkcLine.new($root, arg, :fill => '#000', :width => 2)
line.bind("Button-1") {|e|
#some actions
}
It works, but I dont know how to get which item was clicked.
I have bunch of lines in one canvas. Event passed to code does refers
only to widget which was clicked, but this is canvas itself, not
particular canvas item. Is possible to know which line was clicked?
Best regards,