Link to home
Create AccountLog in
Avatar of ktuser
ktuserFlag for United States of America

asked on

DBRichEdit and hottext Or URL Links

Hi,

I am having issues with hottext or URLLinks. While typing or entering data in the DBRichEdit box  I could see the URLLink get active, (I have AutoUrlDetect property is true). I can save the text in database successfully. When I retrieve the data the URLLink does not appear to be active link. It is just like plane text. It gets active if I add a space at the beginning or end of the UrlLink text.

Could anybody help me to resolve the issue? Is there any thing else I am missing?

I am using Delphi 2005, Interbase/SQL Server database.

Thanks in advance.
Regards,
ktuser.


FYI: The same functionality used to work in previous version of application which was developed using Delphi 5 and DBRichEdit component.
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

hmm... make sure the "PlainText" property is set to false, maybe that's it
Avatar of ktuser

ASKER

There is no such property.

Any other suggestion please!!
Avatar of ktuser

ASKER

Resolution is found.
I need to use DBRichEdit.GetRTFText  function to store the text in the database and after assigning text to DBRichEdit again I need to use it to get the format back.
> There is no such property.
Yes there is...
DBRichEdit1.PlainText

Controls whether the rich edit control treats the text as plain text or rich text when streaming to or from a file.

property PlainText: Boolean;

Description

To write the rich text in the control to a plain text file, set PlainText to True before streaming the text to a file. To ignore the rich text information encoded in a file, set PlainText to True before streaming the text to the control. To stream in the rich text attributes encoded in a file, or save the encoding of the rich text attributes to a file, set PlainText to False.

If the rich text attributes of a file are encoded in some format other than rich text format (RTF), it is necessary to use a converter on the text, even when PlainText is True.

Note:      Rich edit controls do not directly support streaming. Use the Lines property to stream to or from a file.
ASKER CERTIFIED SOLUTION
Avatar of ktuser
ktuser
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer