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 

TComboBox ContextPopup, preventing

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





PostPosted: Thu Apr 13, 2006 10:03 pm    Post subject: TComboBox ContextPopup, preventing Reply with quote



C++ BDS 2006, TComboBox.

The following is intended to prevent the default popup menu on a TComboBox.
//////////////////////////////////////////////////////////////
void __fastcall TAutomaticTestingForm::LockTimeComboBoxContextPopup(
TObject *Sender, TPoint &MousePos, bool &Handled)
{
Handled = true;
}
///////////////////////////////////////////////////////
The right click still displays the popup menu. Setting a breakpoint at "Handled = true;" revealed that the code did not reach this point.

The same code work fine for TMemo.

Is there something I am missing or is there something wrong?

THANKS
Jeff
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Apr 14, 2006 12:03 am    Post subject: Re: TComboBox ContextPopup, preventing Reply with quote



"Jeff Grant" <jeff.grant (AT) jdsu (DOT) com> wrote in message
news:443ebd3b$1 (AT) newsgroups (DOT) borland.com...

Quote:
The right click still displays the popup menu. Setting a breakpoint
at "Handled = true;" revealed that the code did not reach this point.

Do you have your menu assigned to the component's PopupMenu property? If
so, is the menu's AutoPopup property set to false?


Gambit
Back to top
Jeff Grant
Guest





PostPosted: Thu Apr 20, 2006 8:03 pm    Post subject: Re: TComboBox ContextPopup, preventing Reply with quote



I do not have a popup menu in the project. The popup menu property is blank. I don't even know why there is a popup at all.

The popup contains the following items.

Undo
--------
Cut
Copy
Paste
Delete
--------
Select All

I have had this happen on edit boxes and the Handled = true worked there.

THANKS
Jeff


"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:
Quote:

"Jeff Grant" <jeff.grant (AT) jdsu (DOT) com> wrote in message
news:443ebd3b$1 (AT) newsgroups (DOT) borland.com...

The right click still displays the popup menu. Setting a breakpoint
at "Handled = true;" revealed that the code did not reach this point.

Do you have your menu assigned to the component's PopupMenu property? If
so, is the menu's AutoPopup property set to false?


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.