PrintPreview BeginEdit EndEdit and Shading

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

PrintPreview BeginEdit EndEdit and Shading

Postby Bronius » August 26th, 2005, 12:47 pm

TPrintPreview is great. I am using version v4.62. Where is my mistake: I create a page using PrintPreview.Canvas.Brush.Color (see attached file Before_Edit.jpg). When I begin edit pages with BeginEdit()-EndEdit , the bottom of all pages looses shading (see attached file After_Edit.jpg). Thank You.
Attachments
Before_Edit.jpg
View before BeginEdit
Before_Edit.jpg (105.25 KiB) Viewed 2421 times
After_Edit.jpg
View after BeginEdit
After_Edit.jpg (99.67 KiB) Viewed 2421 times
Bronius
Active Member
Active Member
 
Posts: 11
Joined: August 26th, 2005, 12:16 pm

Postby Kambiz » August 26th, 2005, 4:40 pm

Hi,

Probably it's a Windows bug. Could you please post here some part of drawing code for both Creating and Editing of a page?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Sample code

Postby Bronius » August 27th, 2005, 10:19 am

Hello,
this is a Delphi project to show problem.

Sample project creates 3 pages with text on pages pA5, pA4 or pA3. Button "Edit" opens for edit current page. Nothing happens on pA5 pages. Shading disappears from position 280 mm from page top on pages pA4 and pA3.

If I save report to file, after Edit file size becomes smaller.

Thank You.

Bronius
Attachments
Project1.zip
(5.64 KiB) Downloaded 175 times
Bronius
Active Member
Active Member
 
Posts: 11
Joined: August 26th, 2005, 12:16 pm

Postby Kambiz » August 27th, 2005, 10:26 pm

Hi again,

The problem is in FillRect method of TCanvas.

By substituting Canvas.FillRect by the following code, everything works as expected.

Code: Select all
Canvas.Pen.Color := Canvas.Brush.Color;
Canvas.Pen.Style := psInsideFrame;
Canvas.Rectangle(Rect);


Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Thanks

Postby Bronius » August 28th, 2005, 6:03 am

Thank You very much for quick solution of my problem.

Good luck.
------------------
Bronius
Bronius
Active Member
Active Member
 
Posts: 11
Joined: August 26th, 2005, 12:16 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron