Benoit, Have you found time to verify this? Am I doing something wrong, or is it a feature? :-)
Regards Rolf -------- Original-Nachricht -------- Betreff: Re: [Gambas-user] Paginate doesn't clear page Datum: Wed, 05 Dec 2012 13:09:15 +0100 Von: Rolf-Werner Eilert <eilert-sprac...@t-online.de> Antwort an: i...@eilert-sprachen.de, mailing list for gambas users <gambas-user@lists.sourceforge.net> An: gambas-user@lists.sourceforge.net Am 05.12.2012 12:51, schrieb Benoît Minisini: > Le 03/12/2012 15:46, Rolf-Werner Eilert a écrit : >> Hi, >> >> With a little bit of testing code, I tried to find out how Paginate works. >> >> Public Sub drucker_Paginate() >> >> Paint.DrawText("Hallo " & CStr(drucker.Page), 300 + (seiten * 100), >> 300 + (seiten * 100)) >> >> Inc seiten >> >> If seiten = 4 Then drucker.Count = 3 >> >> End >> >> >> Public Sub drucker_Draw() >> >> Paint.DrawText("Hallo " & CStr(drucker.Page), 2000, 2000) >> >> End >> >> "drucker" is the printer object, and "seiten" counts the pages. When >> "drucker.Count = 3" is called, Paginate ends and Draw is called. I think >> this is correct. But the resulting three pages show this: >> >> Page 1: 4 x "Hallo 0" and "Hallo 1" >> Page 2: "Hallo 2" >> Page 3: "Hallo 3" >> >> So obviously, Paginate doesn't clear the page when it ends and the first >> page of the "real" printing is printed on everything Paginate has left >> behind. >> >> If this is a feature, how can I clear the page before I start printing? >> >> Regards >> >> Rolf >> > > Paginate is for computing the number of pages, not for drawing anything. > > You don't have to clear the page, it is done automatically before > calling the Draw event handler. > > Regards, > Yep, and as the example showed, this is exactly what it does not do :-) The page isn't cleared before Draw is called, so there remain 4 "Hallo 0" and the "Hallo 1" on the first page. Rolf ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user