Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I insert a hyperlink into the text inside a TRichEdit control in Delphi?

Posted on 2010-01-12
2
Medium Priority
?
705 Views
Last Modified: 2012-08-13
Hello Experts,

What I want to do is to give the user the facility to insert a reference to a document in the middle of some free text - the reference is sensitive to 'MouseOver' and 'OnClick' events;

For example, the user will type "The company safety policy consists of " and then he/she will click a button to insert a reference at the last carat position. The text now reads..."The company safety policy consists of RIDORR Sections 1 to 5" where "RIDORR Sections 1 to 5" is the reference that is mouse-sensitive.

I want the reference to change colour when the mouse is hovering over it and when the user clicks on the reference I will call up another Form to display the content of the reference. To do all this requires first of all that the reference is somehow made mouse-sensitive. Added to this, the string that forms the reference has to act as a single character when it comes to deletion - the user will delete the whole string with a single 'backspace' keystroke, no partial deletion of the reference is allowed.

This looks very difficult hence the high tariff.

I would consider using a TMemo control instead of TRichEdit if that makes it easier.

Thanks in advance.
0
Comment
Question by:SteveFarndon2000
2 Comments
 
LVL 18

Accepted Solution

by:
Johnjces earned 1500 total points
ID: 26293509
I think that this link to delphi.about.com will satisfy your need to have an RTF in a rich edit control.

http://delphi.about.com/od/vclusing/l/aa111803a.htm

John
0
 

Author Closing Comment

by:SteveFarndon2000
ID: 31676100
Dealt with the issue of creating a mouse-sensitive piece of text but not the requirement ot insert text at the carat position.
Would have prefered to reduce the points but can't see how to do this.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

580 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