Hello,
is there a property or method where I can get the complete Hypertext as String?
Best wishes
Bernhard
Property for the complete Hypertext
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Do you want to read hyperlink target?
In TRichView, hypertext targets are usually stored in item tags. In order to store strings in tags, include rvoTagsArePChars in RichViewEdit.Options.
Then use GetItemTag method. It returns integer, convert it to PChar and assign to string. For example
In TRichView, hypertext targets are usually stored in item tags. In order to store strings in tags, include rvoTagsArePChars in RichViewEdit.Options.
Then use GetItemTag method. It returns integer, convert it to PChar and assign to string. For example
Code: Select all
procedure TForm1.RichViewEdit1Jump(Sender: TObject; id: Integer);
var URL: String;
RVData: TCustomRVFormattedData;
ItemNo: Integer;
begin
RichViewEdit1.GetJumpPointLocation(id, RVData, ItemNo);
URL := PChar(RVData.GetItemTag(ItemNo));
ShellExecute(0, 'open', PChar(URL), nil, nil, SW_SHOW);
end;
-
- Posts: 104
- Joined: Mon Nov 26, 2007 1:49 pm
Thanks for your answer.
But I have to write a routine where I can replace placeholders (Fields) with Values at runtime. So I must iterate each item (including tables, text items, etc.) looking for placeholder (placeholders are beginning with < and ending with > for example <mitarbeiterstamm.nummer>, at runtime it should replace with the value of the field.).
How I can iterate through normal items (text items), I know. But I do not know how can I change the text within tables programmatically.
Best wishes
Bernhard
But I have to write a routine where I can replace placeholders (Fields) with Values at runtime. So I must iterate each item (including tables, text items, etc.) looking for placeholder (placeholders are beginning with < and ending with > for example <mitarbeiterstamm.nummer>, at runtime it should replace with the value of the field.).
How I can iterate through normal items (text items), I know. But I do not know how can I change the text within tables programmatically.
Best wishes
Bernhard
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Have you seen this topic: http://www.trichview.com/forums/viewtopic.php?t=8 ?
-
- Posts: 104
- Joined: Mon Nov 26, 2007 1:49 pm