trichview.com

trichview.support




Re: A Few HTML link Questions


Return to index


Author

Message

Sergey Tkachenko

Posted: 12/16/2004 17:54:02


> 1) I've tried using the following code in the OnJump event:


Did you include rvoTagsArePChars in RichViewEdit1.Options?


rvActionsResource.rvActionInsertHyperlink1.GoToLink(RichViewEdit1, id) must

work.


RichViewEdit1.RVData.GetURL( id ) must not. It simple calls OnURLNeeded (an

obsolete analog of OnReadHyperlink).


The correct code without RichViewActions is:


uses CRVFData;


var RVData: TCustomRVFormattedData;

    ItemNo: Integer;

    URL: String;


  RichViewEdit1.GetJumpPointLocation(id, RVData, ItemNo);

  URL := PChar(RVData.GetItemTag(ItemNo));

  ShellExecute(0, 'open', PChar(URL), nil, nil, SW_SHOW)



> 2) How can I change the TRichViewEdit component to allow the user to

> single click on a link instead of ctrl+click?


To make it read-only (assign ReadOnly=True). In readonly editors, hypertext

works automatically.

Or you can use OnMouseUp and GetItemAt to find the clicked item.





Powered by ABC Amber Outlook Express Converter