Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by v4169sgr (Acolyte)
on Jan 18, 2013 at 10:19 UTC ( #1014022=note: print w/ replies, xml ) Need Help??


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

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?


Comment on Re^6: Tkx g_bind to menu on listbox only for selected row
Replies are listed 'Best First'.
Re^7: Tkx g_bind to menu on listbox only for selected row
by Anonymous Monk on Jan 18, 2013 at 10:28 UTC
    $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?

        There does not seem to be anything like "g_tk___popdown()". How can I pop down the menu?

        You can't, that is the point/purpose/design behind tk_popup, it shows a menu, pauses your program, until user makes a selection (or escapes)

        maybe you want balloons/tooltips ?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014022]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-07-30 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls