List of Hyperlink
List of Hyperlink
First excuse my English.
I'm new in programming in Delphi.
I appreciate your component is one of the best. and so I need help from you for my problem:
My question is:
I have a RichViewEdit1 and RichView1 in RichviewEdit1 will have one with a lot of text links.
Is it possible to list all the hyperlinks that are in RichViewEdit1 in RichView1 in the same Form1?
I want to produce this example
I'm new in programming in Delphi.
I appreciate your component is one of the best. and so I need help from you for my problem:
My question is:
I have a RichViewEdit1 and RichView1 in RichviewEdit1 will have one with a lot of text links.
Is it possible to list all the hyperlinks that are in RichViewEdit1 in RichView1 in the same Form1?
I want to produce this example
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
A list of hyperlinks example: http://www.trichview.com/forums/viewtopic.php?t=397
This example creates a popup form containing a list of all hyperlinks in TListView. The demo moves the caret to the hyperlink chosen in this list.
Ok, as I understand, you want to create a list of hyperlinks not in TListView, but in TRichView. How should this list look like? Should it use the same font as in the original document? How should images-hyperlinks be displayed? What must happen when the user click on a link?
This example creates a popup form containing a list of all hyperlinks in TListView. The demo moves the caret to the hyperlink chosen in this list.
Ok, as I understand, you want to create a list of hyperlinks not in TListView, but in TRichView. How should this list look like? Should it use the same font as in the original document? How should images-hyperlinks be displayed? What must happen when the user click on a link?
thank you for quick response
Ok, as I understand, you want to create a list of hyperlinks not in TListView, but in TRichView.
---> Yes I want to create a list of hypertext in Richview not in TListView
How should this list look like?
--->table index
Should it use the same font as in the original document?
---> Yes
How should images-hyperlinks be displayed?
---> image with Link
What must happen when the user click on a link?
---> got to link in TrichViewEdit
merci encore pour votre compréhension
Ok, as I understand, you want to create a list of hyperlinks not in TListView, but in TRichView.
---> Yes I want to create a list of hypertext in Richview not in TListView
How should this list look like?
--->table index
Should it use the same font as in the original document?
---> Yes
How should images-hyperlinks be displayed?
---> image with Link
What must happen when the user click on a link?
---> got to link in TrichViewEdit
merci encore pour votre compréhension
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
good evening
I decided to make an example of what I would do.
http://www.mediafire.com/?igpexabuub4xvxn
I'll show you in this example in my application contains many hyperlinks. I want to copy the styles Richview green that are richviewEdit
Thank you kindly help me
I decided to make an example of what I would do.
http://www.mediafire.com/?igpexabuub4xvxn
I'll show you in this example in my application contains many hyperlinks. I want to copy the styles Richview green that are richviewEdit
Thank you kindly help me
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sorry for the delay.
I modified your project to create a list of links in RichView1:
http://www.trichview.com/support/files/listoflinks.zip
I modified your project to create a list of links in RichView1:
http://www.trichview.com/support/files/listoflinks.zip
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1. For text hyperlinks, their fonts (including text color) is used. For images, hyperlinks are blue and underlined because they were created using rvActionInsertHyperlink1. To make it green, assign clGreen to rvActionInsertHyperlink1.Color.
2. What version of TRichView do you use? This demo was created for the new version where tags are strings.
2. What version of TRichView do you use? This demo was created for the new version where tags are strings.
Thank you for responding quickly
Allow me a little about the delay because of a problem online
I was not much clarity:
Assuming I have a lot of text with hyperlinks:
- Hyperlinks to the green movement in the same page (internal link).
- And the links in blue hyperlinks to navigate in the Internet browser (external link).
So I want RichView that accepts only the links in green if possible.
We have made some adjustments, but some problems (incompatibility of links, the appearance of blank lines.)
modified test ----> : http://www.mediafire.com/?qm9rqe7pymku6au
I hope you corrected
Allow me to take a lot of your time is precious.
Allow me a little about the delay because of a problem online
I was not much clarity:
Assuming I have a lot of text with hyperlinks:
- Hyperlinks to the green movement in the same page (internal link).
- And the links in blue hyperlinks to navigate in the Internet browser (external link).
So I want RichView that accepts only the links in green if possible.
We have made some adjustments, but some problems (incompatibility of links, the appearance of blank lines.)
modified test ----> : http://www.mediafire.com/?qm9rqe7pymku6au
I hope you corrected
Allow me to take a lot of your time is precious.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can download the updated demo version from http://www.trichview.com/download/
Or, if you want still using the old version, you can exclude rvoTagsArePChars from Options of RichView1 (that is used to display links).
As for link color. I though that you wanted using font of the original hyperlink. Do you want to recolor ALL links and ignore the font color in the document? Do you want to use other font properties (name, size, etc.) of the original links?
Or, if you want still using the old version, you can exclude rvoTagsArePChars from Options of RichView1 (that is used to display links).
As for link color. I though that you wanted using font of the original hyperlink. Do you want to recolor ALL links and ignore the font color in the document? Do you want to use other font properties (name, size, etc.) of the original links?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
To create a list of links of the color clGreen, use this code:
(in your example, green links have not clGreen color but $0050B000, so you need to modify).
Now, we have the next problem: the code in RichView1Jump that selected the chosen hyperlink, no longer work. It assumes that RichView1 and RichViewEdit1 have the same links, so it can use the id parameter (index of link in RichView1) to find link in RichViewEdit1.
I can modify this sample to fix this problem, but I still do not understand: when clicking a link in RichView1, do you want to select it in RichViewEdit1 or open in a browser?
Code: Select all
procedure TFmain.EnumLinksProc(RVData: TCustomRVData; ItemNo: Integer;
var UserData1: Integer; const UserData2: String;
var ContinueEnum: Boolean);
var StyleNo: Integer;
begin
StyleNo := RVData.GetItemStyle(ItemNo);
if RVData.GetRVStyle.TextStyles[StyleNo].Jump and
(RVData.GetRVStyle.TextStyles[StyleNo].Color = clGreen) then
RichView1.AddNLTag(RVData.GetItemText(ItemNo), RVData.GetItemStyle(ItemNo),
0, RVData.GetItemTag(ItemNo));
ContinueEnum := True;
end;
Now, we have the next problem: the code in RichView1Jump that selected the chosen hyperlink, no longer work. It assumes that RichView1 and RichViewEdit1 have the same links, so it can use the id parameter (index of link in RichView1) to find link in RichViewEdit1.
I can modify this sample to fix this problem, but I still do not understand: when clicking a link in RichView1, do you want to select it in RichViewEdit1 or open in a browser?