printing with wxPython

F

Fabio Pliger

Hi!
I'm using wxPython to handle my application gui.. So, I have a notebook
widget and i have to print the object inside it's tab ... Maybe doing a
preview before printing... I know that wx has many objects to handle
printing.. i've tryied to use them, but i wasn't able to... Any hint? By
now, i solved the problem saving a screenshot if the screen in an image(bmp)
and then sending it to printer... (a print preview would be cool...)
tnx
F.P.
 
P

Peter Hansen

Fabio said:
Hi!
I'm using wxPython to handle my application gui.. So, I have a notebook
widget and i have to print the object inside it's tab ... Maybe doing a
preview before printing... I know that wx has many objects to handle
printing.. i've tryied to use them, but i wasn't able to... Any hint? By
now, i solved the problem saving a screenshot if the screen in an image(bmp)
and then sending it to printer... (a print preview would be cool...)
tnx

Maybe the recipes on the wxPython wiki page would
help:
http://wiki.wxpython.org/index.cgi/RecipesOther

There are at least two dealing with "Printing".
 
F

Fabio Pliger

Yeah,
There are two about printing... there is also an example in the wxDemo...
but they all talk about printing text... In my case i need to print (or at
least to make a print preview) a bitmap (or a panel...)
 
P

Peter Hansen

Fabio said:
Yeah,
There are two about printing... there is also an example in the wxDemo...
but they all talk about printing text... In my case i need to print (or at
least to make a print preview) a bitmap (or a panel...)

The technique used should be the same. Basically
you need to be doing draws directly to a Device Context
(or whatever DC stands for...temporary memory lapse)
and then you can draw to the screen or to a printer,
as required.

I don't know offhand what routine is used to draw
a Bitmap into a DC, but I'm sure it's reasonably
well documented under the various DC methods.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,223
Latest member
Jurgen2087

Latest Threads

Top