?
Solved

TEdit default Popup Menu

Posted on 1998-09-18
2
Medium Priority
?
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
erajoj earned 400 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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