 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ted Tripp Guest
|
Posted: Thu May 18, 2006 4:14 am Post subject: Popup menu not closing |
|
|
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
|
Posted: Thu May 18, 2006 6:14 pm Post subject: Re: Popup menu not closing |
|
|
"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
|
Posted: Thu May 18, 2006 11:14 pm Post subject: Re: Popup menu not closing |
|
|
<<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 |
|
 |
|
|
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
|
|