trichview.support
Re: Hyperlink Formatting |
Author |
Message |
Sergey Tkachenko |
Posted: 03/31/2002 11:55:17 This is not a trivial task. You need to store caret position, select urls, apply text style, restore caret position (taking into account that number of items and item indices may be changed) > I am evaluating the TRichView control. And so far it looks really awesome. I > am mostly interested in using it for an html type of editor and so far so > good. However I am trying to figure out how to implement hyperlinks as the > user types. > > I have already studies the demos, and the unit you have URLScan. I would > like to implement something like this but as the user types. > > For example: > > The user types a valid web or email address. After he presses the space key > or enter key i would like to identify the current item text (this i have no > problem) and if it is a valid web address or email address, I would like to > set the text style to a URL Style(blue color, underline, etc. This style > already exists) and set the items string tag to the valid URL or EMail > address. I have got it working fine on the first item, however whenever i > have two email addresses or web addresses one following the other they unite > into one text style. > > So what should look like this > > www.yahoo.com www.yahoo.com > > ends up looking like this > > www.yahoo.com_www.yahoo.com > > The space converts itself into the style of the two items. Is there any > logical way that i can do this. > > Thanks, > > Robert > > |
Powered by ABC Amber Outlook Express Converter