procedure TForm1.Button2Click(Sender: TObject);
var
n:integer;
begin
RichEdit1.selstart:=RichEdit2.selstart;
RichEdit1.sellength:=RichEdit2.sellength;
RichEdit1.SetFocus ;
n:=RichEdit1.Font.height+RichEdit1.Font.size;
if n<0 then n:=-n;
showmessage(inttostr);