DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing content of a memo

 
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming
View previous topic :: View next topic  
Author Message
Kirbster
Member


Joined: 24 Oct 2003
Posts: 3

PostPosted: 24/10/03 16:50    Post subject: Printing content of a memo Reply with quote

Hello,

I am new to these forums, and quite new in Delphi programming (already one year of experience, but I've been learning everything by myself). I need help in printing contents of a TMemo component. I have NO idea how to do it.

Kirbster
Back to top
View user's profile
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 250

PostPosted: 24/10/03 19:25    Post subject: Reply with quote

If you use a TRichEdit instead of TMemo, or just before printing the text assign it to a Rich Edit control, you may find theTPrintPreview component useful.
Back to top
View user's profile Send e-mail Visit poster's website
Johnny_Bit
Junior Member


Joined: 15 Jun 2003
Posts: 98

PostPosted: 25/10/03 07:56    Post subject: Reply with quote

Code:
var
  RE: TRichEdit;
begin
  RE:=TRichEdit.Create(Self);
  re.Visible:=False;
  Re.Parent:=Self;
  Re.PlainText:=True;
  Re.Font:=Main.CurrentEditor.Font;
  Re.WordWrap:=Main.CurrentEditor.WordWrap;
  Re.Lines:=Main.CurrentEditor.Lines;
  ppPrint.BeginDoc;
  ppPrint.PaintRichText(Rect(Margins.Left,Margins.Top,ppPrint.PaperWidth - Margins.Right, ppPrint.PaperHeight-Margins.Bottom),RE, -1, nil);
  ppPrint.EndDoc;
  Re.Free;
  end;
Back to top
View user's profile
Display posts from previous:   
   Reply to topic    DELPHI AREA Forum Index -> Delphi Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2.0.6 © 2001, 2002 phpBB Group