Page 1 of 1

make RichView(Edit) transparent?

Posted: Wed Dec 05, 2007 8:14 pm
by Sega-Zero
Are there any simple way to make them transparent? I mean, to make their background to be painted as it were transparent - copy parent content under the control.
I've found only 1 way to do that - I set OnDrawTextBack, OnDrawCheckpoint, OnDrawPageBreak and OnDrawParaBack events and write that code:

Code: Select all

procedure TForm1.RVStyle1DrawParaBack(Sender: TRVStyle; Canvas: TCanvas; ParaNo: Integer;
  ARect: TRect; var DoDefault: Boolean);
begin
  DrawThemeParentBackground(RichViewEdit1.Handle, Canvas.Handle, nil);
end;
But that trick helps only with a simple edit-like richviews... if they have tables or graphics or child controls, that doesn't work correctly.
if there are no other way, then how can i make tables, cells and craphics transparent?

Posted: Mon Dec 10, 2007 1:51 pm
by Sergey Tkachenko
You can draw background on bitmap and assign it to BackgroundBitmap property.