Changing background color of interactive objects

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Changing background color of interactive objects

Postby Hans Fuchs » Tue Jul 08, 2014 7:22 am

Hello,

i have a report in a preview with special colored interactive objects.
Before printing or writing the report to a pdf-document, i want to change the background color of the interactive objects.
I haven't found a running solution in the vpe-help, can you give me a hint on how to do?

My development environment is delphi2010/XE5 VPE 6.1.

Detailed description:
VPE.OpenDoc
VPE.LoadTemplate(...)
VPE.DumpTemplate(...)
VPE.Preview
!!! Userinput !!!
??? Changing background color of the interactive objects ???
VPE.WriteDoc(test.pdf)

Kind regards
Hans Fuchs
 
Posts: 13
Joined: Mon Mar 17, 2014 9:25 am

Re: Changing background color of interactive objects

Postby IDEAL Software Support » Tue Jul 08, 2014 10:02 am

Please see the help file titled "Programmer's Manual", chapter "dycodoc Template Processing", subchapter "Analysing and Modifying Templates by Code" subsection "Analysing and Modifying the Layout Structure".
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Changing background color of interactive objects

Postby Hans Fuchs » Wed Jul 09, 2014 3:05 pm

Thank you for your answer, but the found sample code didn't solves the demand.
It accesses the objects after LoadTemplate(...) and before DumpTemplate(...).

I need an access after DumpTemplate/Preview and before WriteDoc.
Hans Fuchs
 
Posts: 13
Joined: Mon Mar 17, 2014 9:25 am

Re: Changing background color of interactive objects

Postby IDEAL Software Support » Wed Jul 09, 2014 3:33 pm

Please see TVPEObject.InsertedVpeObject and TVPEObject.InsertedVpeObjectCount.

Iterate over a template as explained in "Analysing and Modifying the Layout Structure". When you have retrieved the handle for a template object, use its method InsertedVpeObject() to retrieve a handle to the corresponding VPE object that has been inserted into the document. Using this handle, you can modify the VPE object directly in the document. Note that text objects of a template might spread over several pages due to auto page breaks. The property InsertedVpeObjectCount returns the number of inserted objects.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: Changing background color of interactive objects

Postby Hans Fuchs » Mon Jul 14, 2014 12:12 pm

It's working! Thanks!
Hans Fuchs
 
Posts: 13
Joined: Mon Mar 17, 2014 9:25 am


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 13 guests

cron