How to select the whole inserted RVF stuff

General TRichView support forum. Please post your questions here
Post Reply
lovethisgame
Posts: 8
Joined: Sat Sep 13, 2008 1:36 am

How to select the whole inserted RVF stuff

Post by lovethisgame »

When I insert a RVF stream from a Richview into a RichViewEdit, it automatically select the part before the inserted, how can i select the whole inserted stuff instead of that.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Code: Select all

uses RVLinear;

var SelStart, SelLength, SelStart2: Integer;
begin
  RVGetSelection(RichViewEdit1, SelStart, SelLength);
  if SelLength<0 then
    inc(SelStart, SelLength);
  RichViewEdit1.Insert....
  SelStart2 := RVGetLinearCaretPos(RichViewEdit1);
  RVSetSelection(RichViewEdit1, SelStart, SelStart2-SelStart);
end;
Post Reply