Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > Re: TMainMenu n...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 6041 of 6157
Post > Topic >>

Re: TMainMenu not getting keyboard messages?

by "Dunny" <paul.dunn1@[EMAIL PROTECTED] > Apr 28, 2008 at 02:36 PM

"Dunny" <paul.dunn1@[EMAIL PROTECTED]
> wrote in message 
news:GPjRj.93157$4f4.21715@[EMAIL PROTECTED]
> My problem is that the mainmenu's keyboard shortcuts are not firing, 
> unless I first press the alt key, or use another menu item (after which,

> they all work).

Found it!

I'm setting the enabled/disabled state (for, say, the "Undo" item) in the 
OnEnterMenuLoop() procedure. This of course is only called when the menu
is 
displayed, not when a menu item's shortcut is intercepted and the OnClick 
handler is executed. Hence, stuff that is disabled stays that way and 
logically ignores shortcuts until the menu is displayed.

Shame the menu handler itself didn't call the OnEnterMenuLoop handler
prior 
to deciding if a menu item is disabled or not. Though I daresay it doesn't

work that way :)

D.


D.
 




 6 Posts in Topic:
TMainMenu not getting keyboard messages?
"Dunny" <pau  2008-04-28 12:56:06 
Re: TMainMenu not getting keyboard messages?
"Dunny" <pau  2008-04-28 14:36:35 
Re: TMainMenu not getting keyboard messages?
"Maarten Wiltink&quo  2008-04-28 18:32:07 
Re: TMainMenu not getting keyboard messages?
"Dunny" <pau  2008-04-28 16:40:10 
Re: TMainMenu not getting keyboard messages?
Rob Kennedy <me3@[EMAI  2008-04-28 20:31:47 
Re: TMainMenu not getting keyboard messages?
"Maarten Wiltink&quo  2008-04-29 10:12:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 11:04:21 CDT 2008.