Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-28-2004, 12:42 PM
bntadams bntadams is offline
Junior Member
 
Join Date: Jan 2004
Posts: 17
Default How do I stop windows from responding to a DBEdit Box right click?

I have a DBEdit box that is being populated by a date in a database and I am using the OnContextPopup Event to Display a message about the dates that are able to be entered when the user RIGHT CLICKS inside the DBEdit Box.

My problem is this, although the message displays just fine windows pops up the standard gray message box that is used to cut, copy, paste, select all, etc..... This is an unwanted side effect of right clicking the DBEdit box and I want to know if there is a way to disable this from happening or if there is a way to return control back to my form almost instantaneously once the windows edit box is displayed? When I click the form the message goes away. Any help appreciated! Thanks for your time.
Reply With Quote
  #2  
Old 01-28-2004, 02:34 PM
dachyon dachyon is offline
Senior Member
 
Join Date: May 2003
Posts: 417
Default RE: How do I stop windows from responding to a DBEdit Box right click?

Not sure if this will help or not :-
<tt><cb>
procedure TForm1.DBEdit1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
begin
showmessage('popup menu');
handled := true;
end;
</cb></tt>

If you set the handled property to true, the message stops here, and does not get propagated to the default context menu handler.


<cb>Dachyon</cb>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:59 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.