trichview.support
Re: Correctly remove hyperlink |
Author |
Message |
Sergey Tkachenko |
Posted: 12/02/2004 21:22:15 First, about hyperlink insertion. The method of using some specific text style (for example, with index 4) for hyperlinks is good only if you plan to use some predefined set of text styles. Otherwise user expects that hyperlink properties depend on properties of the current text - for example, it has the same font but blue and underlined. Look in the demo Demos\Delphi\Assorted\Hypertext\URLs\ It has procedure returning hypertext styleno by nonhypertext style no and vice versa: URLScanEvent. The same demo also shows how to terminate hyperlink on text typing (call TerminateHyperlink when user presses Space or Enter). As for clearing hyperlinks - yes, you need to clear tags as well. It can be done in the same way as assigning tag to the selection (procedure TForm1.SetURLToSelection in the demo Demos\Delphi\Assorted\Hypertext\CreateHyperlink), but pass 0 to the call of rve.SetItemTagEd instead of Integer(StrNew(PChar(URL))) > As in Hyperlink example I've made a hyperlink from selected text, set > TextStyle to 4 (Jump 1) and assigned hyperlink Tag. > > But if I type any text next to this hyperlink it automatically appears as > hyperlink too. How to correctly finish hyperlink I've made from selection ? > > Or if I want user remove this trail hyperlink manually by selecting it and > assign TextStyle 0. Is it right or I need to remove any Tags too ? > > |
Powered by ABC Amber Outlook Express Converter