[Tutor] How to print ALL contents of a scrolled Tkinter window?

boB Stepp robertvstepp at gmail.com
Sat Apr 18 19:03:08 CEST 2015


On Fri, Apr 17, 2015 at 7:04 PM, Laura Creighton <lac at openend.se> wrote:
> In a message of Fri, 17 Apr 2015 21:06:35 +0100, Alan Gauld writes:
>>On 17/04/15 15:29, Laura Creighton wrote:
>>
>>> just use kivy, which has the advantage that is runs under IOS and
>>> Android out of the box.
>>
>>But does Kivy support hard copy printing?
>>That's pretty unusual behaviour on
>>tablets/phones.
>
> Every kivy app lives in precisely one window.  This window has a screenshot
> method.  You can bind it to a button, and you will get a png of exactly
> what your app looks like.
>
> Also, every widget has an export_to_png method which you can use to
> capture the widget and its children.

Have these types of methods ever been considered for tkinter? They
would go a long way to giving people a way to print, while not getting
into a lot of OS hassle. In my particular scenario I would desire the
ability to output both postscript and pdf, though if I have the first
it is easy to get the latter.

boB Stepp


More information about the Tutor mailing list