diff --git a/components/richmemo/samples/links/project1.lpi b/components/richmemo/samples/links/project1.lpi
index aa68a91c3..a3c21b3bc 100644
--- a/components/richmemo/samples/links/project1.lpi
+++ b/components/richmemo/samples/links/project1.lpi
@@ -46,6 +46,7 @@
+
@@ -61,6 +62,13 @@
+
+
+
+
+
+
+
diff --git a/components/richmemo/samples/links/unit1.lfm b/components/richmemo/samples/links/unit1.lfm
index 54a353cb0..54d30b288 100644
--- a/components/richmemo/samples/links/unit1.lfm
+++ b/components/richmemo/samples/links/unit1.lfm
@@ -16,7 +16,9 @@ object Form1: TForm1
Anchors = [akTop, akLeft, akRight, akBottom]
HideSelection = False
Lines.Strings = (
- 'RichMemo1'
+ 'RichMemo1 RichMemo1 '
+ 'RichMemo1 RichMemo1 '
+ 'RichMemo1 RichMemo1 '
)
OnMouseUp = RichMemo1MouseUp
TabOrder = 0
@@ -26,17 +28,17 @@ object Form1: TForm1
Left = 8
Height = 25
Top = 8
- Width = 75
- Caption = 'Button1'
+ Width = 96
+ Caption = 'Make Link'
OnClick = Button1Click
TabOrder = 1
end
object Button2: TButton
- Left = 88
+ Left = 120
Height = 25
Top = 8
- Width = 75
- Caption = 'Button2'
+ Width = 96
+ Caption = 'Unlink'
OnClick = Button2Click
TabOrder = 2
end
diff --git a/components/richmemo/samples/links/unit1.pas b/components/richmemo/samples/links/unit1.pas
index 791306a9a..e7af6d3a2 100644
--- a/components/richmemo/samples/links/unit1.pas
+++ b/components/richmemo/samples/links/unit1.pas
@@ -61,8 +61,9 @@ end;
procedure TForm1.OnLinkAction(Sender: TObject; AAction: TLinkAction;
const AMouseInfo: TLinkMouseInfo; StartChar, LenChars: Integer);
begin
- if AMouseInfo.button = mbLeft then
- writeln('sel: ', StartChar,' ', LenChars);
+ if AMouseInfo.button = mbLeft then begin
+ ShowMessage( 'Link Text: "'+RichMemo1.GetText(StartChar, LenChars)+'"' );
+ end;
end;
end.