trichview.com

trichview.support




Re: list all Hyperlink?


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/22/2004 20:01:55


The simplest code uses undocumented method TRichView.RVData.EnumItems.

It calls user-defined procedure for each item.

Item.GetBoolValueEx method is also undocumented. It's the simplest way to

determine if the item is a hyperlink (otherwise you need to check item

styles)


procedure TForm3.EnumHyperlinks(RVData: TCustomRVData; ItemNo: Integer;

  var UserData1: Integer; const UserData2: String;

  var ContinueEnum: Boolean);

begin

   if RVData.GetItem(ItemNo).GetBoolValueEx(rvbpJump, RVStyle1) then

     Memo1.Lines.Add(PChar(RVData.GetItemTag(ItemNo)));

   ContinueEnum := True;

end;


procedure TForm3.StatusBar1Click(Sender: TObject);

var v: Integer;

begin

  v := 0;

  Memo1.Clear;

  RichViewEdit1.RVData.EnumItems(EnumHyperlinks, v, '');

end;


>

> In your Create hyperlinks you can add many hyperlinks, is there anyway to

> list these hyperlinks? I want to show all the links for a document.

>

> thanks





Powered by ABC Amber Outlook Express Converter