I have problem with printing. Demo code (Thanks to developers of it)
is a little bit convoluted for me. I tried to read wiki examples and I
see only "black colour". I beg you to help me get started. I have
experience on wxPython but I have never ever tried printing. Basically
I want to print wxListCtrl. Please help me as I don't know where to
start!
Thanks for devoting your time helping
Steve
Hi Steve,
wx-snapshot.py (2.32 KB)
snapshotPrinter.py (2.64 KB)
···
On Sun, Sep 13, 2009 at 12:49 PM, evstevemd mwinjilisti@gmail.com wrote:
I have problem with printing. Demo code (Thanks to developers of it)
is a little bit convoluted for me. I tried to read wiki examples and I
see only “black colour”. I beg you to help me get started. I have
experience on wxPython but I have never ever tried printing. Basically
I want to print wxListCtrl. Please help me as I don’t know where to
start!
Thanks for devoting your time helping
Steve
Since it sounds like you just want to print your application’s current state and not create some kind of report or whatever, I decided to hack together a simple example from some of my old code. Run the wx-snapshot.py and press the button. This will run some code that creates a png file that is a representation of the frame and its contents. It then creates an html file that contains the png file and it will then display a pop-up frame that allows you to print it.
In this example I use HtmlEasyPrinting. I tested this on Windows XP with wxPython 2.8.10.1 and Python 2.5.2 and it worked fine for me. This example should work no matter what widget(s) are on the frame. However, if there’s additional data that is outside of the frame (i.e. scrolled out of view in a grid or listctrl), then this method won’t work unless you can resize your application to make all the data appear. If you cannot do this, then you’ll have to represent your data in some other way.
Maybe I should take this example and make a tutorial out of it…if anyone has opinions, let me know.
Mike Driscoll
evstevemd wrote:
I have problem with printing. Demo code (Thanks to developers of it)
is a little bit convoluted for me. I tried to read wiki examples and I
see only "black colour". I beg you to help me get started. I have
experience on wxPython but I have never ever tried printing. Basically
I want to print wxListCtrl. Please help me as I don't know where to
start!
You might want to look at ObjectListView, first of all it is a much nicer ListCtrl and I think it is also easier to work with.
http://objectlistview.sourceforge.net/python/
With regards to printing:
http://objectlistview.sourceforge.net/python/listCtrlPrinter.html#using-listctrlprinter
Werner
Thank Mike,
that is great. I want to print Only wxListCtrl only
Thank for example, I will try to fiddle out to see what I can come up
with
Steve
···
On Sep 14, 12:19 pm, werner <wbru...@free.fr> wrote:
evstevemd wrote:
> I have problem with printing. Demo code (Thanks to developers of it)
> is a little bit convoluted for me. I tried to read wiki examples and I
> see only "black colour". I beg you to help me get started. I have
> experience on wxPython but I have never ever tried printing. Basically
> I want to print wxListCtrl. Please help me as I don't know where to
> start!You might want to look at ObjectListView, first of all it is a much
nicer ListCtrl and I think it is also easier to work with.ObjectListView — ObjectListView v1.2 documentationWith regards to printing:Using a ListCtrlPrinter — ObjectListView v1.2 documentation…
Werner
Thanks Werner for pointing that,
I'm especially impressed with explanation on print command.
I will check and see. But it is somehow old and may be be dead?
project
Just curious, have you used it?
- Steve -
···
On Sep 14, 12:19 pm, werner <wbru...@free.fr> wrote:
evstevemd wrote:
> I have problem with printing. Demo code (Thanks to developers of it)
> is a little bit convoluted for me. I tried to read wiki examples and I
> see only "black colour". I beg you to help me get started. I have
> experience on wxPython but I have never ever tried printing. Basically
> I want to print wxListCtrl. Please help me as I don't know where to
> start!You might want to look at ObjectListView, first of all it is a much
nicer ListCtrl and I think it is also easier to work with.ObjectListView — ObjectListView v1.2 documentationWith regards to printing:Using a ListCtrlPrinter — ObjectListView v1.2 documentation…
Werner
Steve,
evstevemd wrote:
Thanks Werner for pointing that,
I'm especially impressed with explanation on print command.
I will check and see. But it is somehow old and may be be dead?
project
Just curious, have you used it?
Yes, I use it in my shareware.
I use it from SVN and just checking SVN statistics on Sourcefourge I can see "write activity" as recent as last month, also I haven't updated my copy for a few month.
Phillip (grammarian) has been very reactive whenever I have had a problem and/or question on how to use it.
Werner
I think SVN is different from the one at normal repo
Thanks I will see what is in SVN
···
On Sep 15, 6:51 pm, werner <wbru...@free.fr> wrote:
Steve,
evstevemd wrote:
> Thanks Werner for pointing that,
> I'm especially impressed with explanation on print command.
> I will check and see. But it is somehow old and may be be dead?
> project
> Just curious, have you used it?Yes, I use it in my shareware.
I use it from SVN and just checking SVN statistics on Sourcefourge I can
see "write activity" as recent as last month, also I haven't updated my
copy for a few month.Phillip (grammarian) has been very reactive whenever I have had a
problem and/or question on how to use it.Werner