New topic: 

printing contents of Textarea

<http://forums.realsoftware.com/viewtopic.php?t=44044>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        f_hendriksen          Post subject: printing contents of 
TextareaPosted: Thu May 17, 2012 11:41 am                         
Joined: Fri Sep 18, 2009 8:09 am
Posts: 30                I'm using the following code to print the contents of 
a textarea, but there is no wordwrap, so I get very long lines that don't fit 
on the paper.

 Dim g as Graphics
  Dim p as PrinterSetup
  p=New PrinterSetup
  If p.PageSetupDialog then
  g=OpenPrinterDialog(p)
  If g<> Nil then
  g.TextFont="Helvetica"
  g.TextSize=9
  g.DrawString TextArea.text, 50,50
  p.MaxHorizontalResolution=-1
  p.MaxVerticalResolution=-1
  End if
  End if   
                             Top                Bob Keeney          Post 
subject: Re: printing contents of TextareaPosted: Thu May 17, 2012 12:03 pm     
                            
Joined: Fri Sep 30, 2005 11:48 am
Posts: 3012
Location: Lenexa, KS                You are not passing in all of the 
parameters you can on the DrawString.  There are optional wrap width and 
condense properties.  http://docs.realsoftware.com/index.php/Graphics.DrawString

You also might want to take a look at StyledTextPrinter and it's DrawBlock 
method.  http://docs.realsoftware.com/index.php/StyledTextPrinter      
_________________
Bob K.

30+ hours of Real Studio Video Training (including over 6 hours of Web Edition) 
at http://www.bkeeney.com/
Real Studio Consulting http://www.bkeeney.com/consulting/real-studio-consulting 
     
BKeeney Briefs Blog For Real Studio Developers http://www.bkeeneybriefs.com/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to