[pygtk] Custom paper size
Joel Juvenal Rivera Rivera
joelriv at gmail.com
Thu Mar 4 06:24:39 WST 2010
Ok, I get it, I was trying to change a predefined size and
I didn't know that function.
Thank You Dieter.
El mié, 03-03-2010 a las 19:49 +0100, Dieter Verfaillie escribió:
> Quoting "Joel Juvenal Rivera Rivera" <joelriv at gmail.com>:
> > Hello,
> > I hope somebody could help me with this...
> >
> > when I do:
> > paper = gtk.PaperSize()
> > paper.set_size(216,140,gtk.UNIT_MM)
> >
> > raise this warning:
> > GtkWarning: gtk_paper_size_set_size: assertion `size->is_custom' failed
> >
> > And the size of the paper remains unchanged.
>
> You could try the following to create a custom paper size:
> >>> paper = gtk.paper_size_new_custom('newcustom',
> >>> 'new_custom_papersize', 216, 140, gtk.UNIT_MM)
> >>> paper.is_custom()
> True
>
> Regards,
> Dieter
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20100303/7a9b617d/attachment-0001.htm
More information about the pygtk
mailing list