1-how can I implant this procedure to Srichviewedit and without externalRvStyle
and RVStyle1DrawParaBack = ? (where write events) for Srichviewedit.
2-is there dual editor a example for Srichviewedit
procedure TForm1.RVStyle1DrawParaBack(Sender: TRVStyle; Canvas: TCanvas;
ParaNo: Integer; ARect: TRect; var DoDefault: Boolean);
var i, j: Integer;
MakeRed: Boolean;
begin
i := Sender.ItemNo;
if Sender.RVData=RichViewEdit1.RVData then
if FocusedEditor = RichViewEdit1 then
j := RichViewEdit1.CurItemNo
else
j := HltItemNo1
else
if FocusedEditor = RichViewEdit2 then
j := RichViewEdit2.CurItemNo
else
j := HltItemNo2;
repeat
MakeRed := i=j;
if MakeRed then
break;
dec(i);
until TCustomRVData(Sender.RVData).IsFromNewLine(i+1);
if MakeRed then begin
Canvas.Brush.Style := bsSolid;
Canvas.Brush.Color := $CCCCFF;
Canvas.FillRect(ARect);
end;
end;
dualeditor for Srichviewedit
In SRichViewEdit it is possible to use internal RVStyle ("public" property SRichViewEdit. RVStyle) or external ExternalRVStyle.
If you do not wish to use ExternalRVStyle, you need:
If you do not wish to use ExternalRVStyle, you need:
Code: Select all
SRichViewEdit.RVStyle.OnDrawParaBack := RVStyle1DrawParaBack;