Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: tk menu commands dont work while button pressed

by Sandy (Curate)
on Jan 23, 2009 at 22:04 UTC ( #738603=note: print w/replies, xml ) Need Help??


in reply to tk menu commands dont work while button pressed

Believe it or not, the answer is really simple

Try

$menu->Post($x, $y);
instead of
$menu->post($x, $y);
According to the Mastering Perl/Tk book (Steve Lidie & Nancy Walsh):
The post and Post Methods

The lower-level mechanism is the Menu post method, which posts a menu at a specific screen coordinate. The Post method works like post, but additioinally activates a specific menu item.

I tried... it worked.

Replies are listed 'Best First'.
Re^2: tk menu commands dont work while button pressed
by mpage (Initiate) on Jan 23, 2009 at 22:14 UTC
    Sweet! Just like you say, thanks. Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://738603]
help
Chatterbox?
Discipulus shutdown and logoff seem untrappable by Perl on win. But it is in Cygwin. but i cannot switch to it
[choroba]: It has the widest rear seats space available in the same price category - needed for the 3 kids.
Discipulus families growth is related to price of cars nowadays..
[choroba]: price of anything, unfortunately
[Discipulus]: yes, unfortunately.
[Corion]: Discipulus: you can "easily" trap shutdown/logoff in a Win32::GUI application by capturing and responding to the appropriate message

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-01-17 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (154 votes). Check out past polls.