in reply to How to bind single click to get an path of an entry in Tk::HList

From my memory of Hlist, I think you can get the closest element to a x-y mouse event. Here is a an old tip I found:

======== > atm when I right click on an entry in my hlist it doesnt select the > entry currently under the mouse pointer (ie explorer like behaviour) +. > Can some1 give me a few pointers. > I've had the same problem and this is my solution - when user press <Button-3> we send <Button-1> with same coords. $tree->bind("<Button-3>" => [\&menu_popup, Ev('x'), Ev('y')]); sub menu_popup { my ($wg,$x,$y) = @_; $wg->eventGenerate('<Button-1>', -x => $x , -y => $y ); if (my $sel=$wg->info("selection")) { $menu->Popup(-popover => "cursor", -popanchor => 'nw') }

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: How to bind single click to get an path of an entry in Tk::HList
  • Download Code