mail-archives/gtk-sharp-list/2008-March/008520.html

82 строки
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Gtk-sharp-list] printing multiple pages with Gtk#
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20printing%20multiple%20pages%20with%20Gtk%23&In-Reply-To=1206241361.7160.162.camel%40studio">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="008519.html">
<LINK REL="Next" HREF="008524.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Gtk-sharp-list] printing multiple pages with Gtk#</H1>
<B>Mike Kestner</B>
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20printing%20multiple%20pages%20with%20Gtk%23&In-Reply-To=1206241361.7160.162.camel%40studio"
TITLE="[Gtk-sharp-list] printing multiple pages with Gtk#">mkestner at gmail.com
</A><BR>
<I>Sat Mar 22 23:35:02 EDT 2008</I>
<P><UL>
<LI>Previous message: <A HREF="008519.html">[Gtk-sharp-list] printing multiple pages with Gtk#
</A></li>
<LI>Next message: <A HREF="008524.html">[Gtk-sharp-list] Forcing a resize in nested widgets
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8520">[ date ]</a>
<a href="thread.html#8520">[ thread ]</a>
<a href="subject.html#8520">[ subject ]</a>
<a href="author.html#8520">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>
On Sat, 2008-03-22 at 22:02 -0500, Jestin Stoffel wrote:
&gt;<i> public void OnBeginPrint(object sender, Gtk.BeginPrintArgs Args)
</I>&gt;<i> {
</I>&gt;<i> int nSize = SomeSizeCalculationFunction();
</I>&gt;<i>
</I>&gt;<i> int nPages = nSize / (int)Args.Context.Height;
</I>&gt;<i>
</I>&gt;<i> if(nSize % Args.Context.Height &gt; 0)
</I>&gt;<i> {
</I>&gt;<i> nPages++;
</I>&gt;<i> }
</I>
----&gt; PrintOperation Op = sender as PrintOperation;
&gt;<i>
</I>&gt;<i> Op.NPages = nPages; // OUT OF SCOPE
</I>&gt;<i> }
</I>
--
Mike Kestner &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">mkestner at gmail.com</A>&gt;
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="008519.html">[Gtk-sharp-list] printing multiple pages with Gtk#
</A></li>
<LI>Next message: <A HREF="008524.html">[Gtk-sharp-list] Forcing a resize in nested widgets
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8520">[ date ]</a>
<a href="thread.html#8520">[ thread ]</a>
<a href="subject.html#8520">[ subject ]</a>
<a href="author.html#8520">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
mailing list</a><br>
</body></html>