Solved

TEdit default Popup Menu

Posted on 1998-09-18
2
419 Views
Last Modified: 2012-05-05
If a PopupMenu is not specified for an Edit control. A default PopupMenu is displayed. I would like to find out the whereabouts of this menu as I am looking to copy the functionality in terms of disabling options depending on whether text is selected or the clipboard is empty into the Main Menu.
0
Comment
Question by:archapman
2 Comments
 
LVL 4

Accepted Solution

by:
erajoj earned 100 total points
ID: 1340111
Hi,
I haven't found the menu and don't think it exists other than when it's visible. But to copy the functionality, do this:

&Undo
-----
Cu&t
&Copy
&Paste
&Delete
-----
Select &All

Undo     = Boolean( SendMessage( Edit.Handle, EM_CANUNDO, 0, 0 ) );
Copy/Cut/Delete = Edit.SelLength > 0;
Paste = Clipboard.HasFormat( CF_TEXT ); // uses clipbrd
SelectAll => SendMessage( Edit.Handle, EM_SETSEL, 0, -1 );

Thats it.

/// John
0
 

Author Comment

by:archapman
ID: 1340112
Thanks - just what I was looking for.


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now