Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Tkx g_bind to menu on listbox only for selected row

by Anonymous Monk
on Jan 18, 2013 at 10:03 UTC ( #1014011=note: print w/replies, xml ) Need Help??


in reply to Re^4: Tkx g_bind to menu on listbox only for selected row
in thread Tkx g_bind to menu on listbox only for selected row

%X and %Y are not %x and %y, you want %y
  • Comment on Re^5: Tkx g_bind to menu on listbox only for selected row

Replies are listed 'Best First'.
Re^6: Tkx g_bind to menu on listbox only for selected row
by v4169sgr (Acolyte) on Jan 18, 2013 at 10:19 UTC

    Thanks. I am sure you are right, but I need %X and %Y to get the position of the context menu right. How do I go about getting both sets of coordinates bound to the same Motion event?

      $lb->g_bind( "<Enter>", [ sub { my ( $X, $Y, $y, $lb ) = @_; warn " $X,$Y,$y,$lb " }, Tkx::Ev(qw' %X %Y %y '), $lb, ], );

        Thanks! That worked for me!

        Final question: The menu persists after the user has moved the mouse away from the selected row. There does not seem to be anything like "g_tk___popdown()". How can I pop down the menu?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014011]
help
Chatterbox?
Discipulus a missing semicolon after use LWP::UserAgent caused very strange behaviour and not the normal warning...
[choroba]: Yes, sometimes missing ; after the use clause just interprets the next line somehow and passes the result to the used module which could happily ignore it. Been there, seen that.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2017-02-28 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (398 votes). Check out past polls.