BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TMenuItem OnClick fires unexpectedly

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Dec 22, 2005 10:05 pm    Post subject: TMenuItem OnClick fires unexpectedly Reply with quote



I have a TMainMenu on my main form of the application. Let's say the
menu structure is

File
-------
New
-----> Window
-----> Tab
Save
Exit

where New, Save, & Exit are submenus of File
where Window & Tab are submenus of New

If I add an OnClick event to "Save" then the event will only fire when
"Save" is actually clicked

If I add an OnClick event to "New" then, "New" OnClick event will fire
when I just mouseover the item.

Because "Save" does not have a submenu item, the OnClick event will not
fire unless clicked.
The behavior is the same for TPopupMenu component as well.

My question to the group is - How do I ensure that "New" will only fire
when actually clicked. It is necessary that I retain the submenu's of
"New"


thanks in advance
Melder
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.