[Gambas-user] R: Can't print in Gambas 3 [solved]

Ru Vuott vuott at ...325...
Thu May 17 10:36:33 CEST 2012


> No. You must specify the event name if you want to catch the
> events 
> raised by the Printer object.
> 
> -- 
> Benoît Minisini
> 

...Oh, yes, Benoît. I forgot that it's an "object" !

Well, so:

****

Private mijnprinter As New Printer


Public Sub Form_Open()

 Object.Attach(mijnprinter, Me, "pripri") ' <---- We need it !!!

 If mijnprinter.Configure() = True Then Return

  With mijnprinter
    .FirstPage = 0
    .Orientation = 1
    .Paper = 2
    .OutputFile = "/tmp/imprimatur.pdf"
    .Print
  End With
  
End


 Public Sub pripri_Draw()

 With Paint
 .DrawText("Imprimatur", 500, 1000, 400, 500)
 .RichText(String.Chr(&1D11E), 600, 2000, 200, 200)
 .Fill
 .End
 End With

End

***********

Now, it works !

Bye.




More information about the User mailing list