Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

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


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

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


Comment on Re^7: Tkx g_bind to menu on listbox only for selected row
Download Code
Re^8: Tkx g_bind to menu on listbox only for selected row
by v4169sgr (Acolyte) on Jan 18, 2013 at 11:11 UTC

    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 ?

        No good for me, as I need to call subs from the user's selection. Frustrating, as all the available documentation I've seen refers to 'the OSs native functions' for popping the menu down. I really don't want the user to have to remember to press 'Esc' to get rid of the menu!

        Windows manages to do this with its own apps, why can't Perl?

        Thanks a lot for all your help anyway!!! I've got it semi-working now but will leave it turned off by default, activatable by user option as an experiment until I find something better.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-11-01 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (229 votes), past polls