[Gambas-user] Yet another simple printing question !
Tobias Boege
taboege at ...626...
Fri Mar 21 17:18:25 CET 2014
On Fri, 21 Mar 2014, Vasilis Kanatas wrote:
> Thanks Tobi,
>
> I tried to find a solution in order to print Labels that I placed into a
> ScrollArea.
> It is obvious that it only prints the background of the ScrollArea and not
> the Labels or Buttons or anything other that I put there in design time.
>
> So the problem remains!
Yes, I told you what your problem is, not how to solve it, hoping you could
figure it out yourself.
> How can I place data on a form (or any container of this form) and then
> print them as I see them?
> Actually I only want to place text in Labels and then get a print (a
> receipt)
>
If you want to use that method, the only way I see is to capture a
screenshot of your program or desktop and then cut it appropriately. We
already did this as a replica for Gambas 2's Control.Grab() but it is
inherently inexact. We used the following code:
Public Function ActiveGrab() As Picture
With New DesktopWindow(Desktop.ActiveWindow)
Return Desktop.Screenshot(.X, .Y, .W, .H)
End With
End
together with the Desktop facilities from gb.desktop.
BUT, there is gb.report which I have never used but from what I heard here
on the list seems EXACTLY what you need...
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list