New topic: 

Printer Dialog problems

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

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        DanSandbergUCONN          Post subject: Printer Dialog 
problemsPosted: Thu Feb 07, 2013 1:51 pm                         
Joined: Fri Dec 21, 2007 9:50 am
Posts: 216                Hi All - 

My program output is printed in an editfield. I want to give the user the 
option to print the contents of that editfield. I have implemented the 
following code:
dim settings as string
dim pagesetup as PrinterSetup
pagesetup=new PrinterSetup
if pagesetup.PageSetupDialog then
  
  dim stp as StyledTextPrinter
  dim myg as Graphics
  myg=OpenPrinterDialog()
  if myg<>nil then
  stp=EditField1.styledTextPrinter(myg,72*7)
  stp.DrawBlock 0,0,72*9
  end if
end if
However, no matter what I select in the PrinterSetupDialog the margins and 
printable area is always the same. It seems like the way I've set it up the 
OpenPrinterDialog() is ignoring the PageSetupDialog() values. Any ideas?   
                             Top                timhare          Post subject: 
Re: Printer Dialog problemsPosted: Thu Feb 07, 2013 8:10 pm                     
    
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12055
Location: Portland, OR  USA                Well, you're giving it a fixed width 
(72*7).  Try passing it g.Width instead.

stp=EditField1.styledTextPrinter(myg, myg.width)   
                             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