[Gtk-sharp-list] printing multiple pages with Gtk#
Mike Kestner
mkestner at gmail.com
Sat Mar 22 23:35:02 EDT 2008
On Sat, 2008-03-22 at 22:02 -0500, Jestin Stoffel wrote:
> public void OnBeginPrint(object sender, Gtk.BeginPrintArgs Args)
> {
> int nSize = SomeSizeCalculationFunction();
>
> int nPages = nSize / (int)Args.Context.Height;
>
> if(nSize % Args.Context.Height > 0)
> {
> nPages++;
> }
----> PrintOperation Op = sender as PrintOperation;
>
> Op.NPages = nPages; // OUT OF SCOPE
> }
--
Mike Kestner <mkestner at gmail.com>
More information about the Gtk-sharp-list
mailing list