Solved

TEdit default Popup Menu

Posted on 1998-09-18
2
427 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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