Tprintprview : Re-edit a canevas ?

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

Tprintprview : Re-edit a canevas ?

Postby dav999 » April 8th, 2004, 9:22 am

Hello

i have 3 pages on my project, if i have create page N°3 with .NewPage procedure, can i edit the canevas in my second page ?

i have a little problem for calculate total number (pages) of my print, and i have trying to edit a canevas, but i can't rewrite on this canevas (n°2)

Can i edit a canevas, if a i have create already a new page ?

Thanks
excuse for my poor english, but if anyone speak french :)
David
dav999
Active Member
Active Member
 
Posts: 14
Joined: October 7th, 2003, 3:04 pm

Postby Kambiz » April 11th, 2004, 2:10 pm

Each page is a metafile, so you can edit it.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby dav999 » May 13th, 2004, 12:10 pm

I can edit each page ?

Can i seek the first page and make this :
print.canevas.textout(150,150,'Text');

i can't reedit my page for insert the n# total of my pages

Thanks
David

ps : i try to add after 2 pages in manual mode (drawtext, textout,...), to insert a RTF document, it's no a problem ?

if you would i can send you the source code
dav999
Active Member
Active Member
 
Posts: 14
Joined: October 7th, 2003, 3:04 pm

Postby Kambiz » May 14th, 2004, 10:54 am

I added BeginEdit and EndEdit methods to the control's interface. Using these methods, editing an existing page is similar to its creation.

For example, the following code can be used for your purpose:

Code: Select all
with PrintPreview do
  for PageNo := 1 to TotalPages do
    if BeginEdit(PageNo) then
      try
        // Use Canvas to draw on the page
      finally
        EndEdit;
      end;

By the way, while editing a page, PrintPreview.State property is psEditing.

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

Postby dav999 » May 14th, 2004, 11:15 am

Ok thanks for your great componants

i go immediatly download the new version

david
dav999
Active Member
Active Member
 
Posts: 14
Joined: October 7th, 2003, 3:04 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron