Delphi7, Delphi2009, KOL 3.04++++
RE_URL выдает только первую букву адреса.
program Project1;
uses
Windows, Messages, ShellAPI, KOL;
type
PForm1 = ^TForm1;
TForm1 = object(TObj)
Form: PControl;
RichEdit1: PControl;
public
procedure RichEdit1RE_URLClick(Sender: PObj);
end;
procedure NewForm1(var Result: PForm1; AParent: PControl);
begin
New(Result, Create);
with Result^ do
begin
Form := NewForm(AParent, 'Project1');
Form.Add2AutoFree(Result);
Applet := Form;
Form.SetClientSize(640, 480).CenterOnParent;
RichEdit1 := NewRichEdit( Form, [] );
RichEdit1.SetAlign(caClient);
RichEdit1.OnRE_URLClick := RichEdit1RE_URLClick;
RichEdit1.RE_Append('
http://www.google.ru', False);
end;
end;
procedure TForm1.RichEdit1RE_URLClick(Sender: PObj);
begin
MsgOK( PControl(Sender)^.RE_URL );
end;
var
Form1: PForm1;
begin
NewForm1(Form1, nil);
Run(Form1.Form);
end.