how to print the content of editbox in cells?
how to print the content of editbox in cells?
I insert some editbox in cells,but the print result didn't show the content
of editbox?
how can I do it?
help me,thanks
of editbox?
how can I do it?
help me,thanks
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I can see the content of the editbox in the screen,but printer's output is blank when I print the richview.
Code: Select all
procedure TfrmCheck.btnPrintClick(Sender: TObject);
var printit:Boolean;
begin
if dlgPrint1.Execute then
begin
printit:=True;
end;
if PrintIt then begin
rvprnt1.AssignSource(rchvw1);
rvprnt1.FormatPages(rvdoALL);
if rvprnt1.PagesCount>0 then
rvprnt1.Print('demo,1,False);
end;
end;
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
When a control is inserted in TRichViewEdit, it works just like if it is inserted in a form.
When printing, TRVPrint needs to create an image of this control. TRVPrint can do it for main standard controls, and tries to draw unknown controls using their PaintTo method. However, this method works not for all controls.
I contacted DevExpress support. I hope we will provide a solution tomorrow.
When printing, TRVPrint needs to create an image of this control. TRVPrint can do it for main standard controls, and tries to draw unknown controls using their PaintTo method. However, this method works not for all controls.
I contacted DevExpress support. I hope we will provide a solution tomorrow.
-
- Site Admin
- Posts: 17524
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
In the next update of TRichView, TcxTextEdit controls will be printed.
Before that update, you can use TRVPrint.OnPrintComponent event:
Before that update, you can use TRVPrint.OnPrintComponent event:
Code: Select all
uses CtrlImg;
procedure TForm1.RVPrint1PrintComponent(Sender: TCustomRVPrint;
PrintMe: TControl; var ComponentImage: TBitmap);
begin
if PrintMe is TcxTextEdit then begin
ComponentImage := TBitmap.Create;
ComponentImage.Width := PrintMe.Width;
ComponentImage.Height := PrintMe.Height;
TWinControl(PrintMe).PaintTo(ComponentImage.Canvas, 0, 0);
end
else
ComponentImage := DrawControl(PrintMe);
end;