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 

Popup menu not closing

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





PostPosted: Thu May 18, 2006 4:14 am    Post subject: Popup menu not closing Reply with quote



BCB5 XP

Hi, simple problem, I think. I have a popup that is not closing after
clicking the menu item. It's on a 3rd party control and I think I just need
to force it to close after it's done with it's action, or before it's
action. Any ideas?

Thx
TT
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu May 18, 2006 6:14 pm    Post subject: Re: Popup menu not closing Reply with quote



"Ted Tripp" <ttripp (AT) rankexec (DOT) com> wrote in message
news:446bedff (AT) newsgroups (DOT) borland.com...

Quote:
I have a popup that is not closing after clicking the menu item.
It's on a 3rd party control and I think I just need to force it to
close after it's done with it's action, or before it's action.

Are you displaying the PopupMenu yourself, via its Popup() method? If so,
then you should be calling SetForegroundWindow() before calling Popup(). If
the control is displaying the PopupMenu, then it should be calling
SetforegroundWindow() before calling Popup().

Why do this? Please there is a nasty bug in the OS that has been around for
years without being fixed, where a popup menu is not dismissed properly if
shown from a window that does not have proper focus.


Gambit
Back to top
Ted Tripp
Guest





PostPosted: Thu May 18, 2006 11:14 pm    Post subject: Re: Popup menu not closing Reply with quote



<<Why do this?>>
Are you asking me? This window happens to be the only form in the
application, I'm not sure how to give it more focus than that.

TT

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in message
news:446cb347 (AT) newsgroups (DOT) borland.com...
Quote:

"Ted Tripp" <ttripp (AT) rankexec (DOT) com> wrote in message
news:446bedff (AT) newsgroups (DOT) borland.com...

I have a popup that is not closing after clicking the menu item.
It's on a 3rd party control and I think I just need to force it to
close after it's done with it's action, or before it's action.

Are you displaying the PopupMenu yourself, via its Popup() method? If so,
then you should be calling SetForegroundWindow() before calling Popup().
If
the control is displaying the PopupMenu, then it should be calling
SetforegroundWindow() before calling Popup().

Why do this? Please there is a nasty bug in the OS that has been around
for
years without being fixed, where a popup menu is not dismissed properly if
shown from a window that does not have proper focus.


Gambit

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) 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.