Width of a TppLabel at runtime
Hi,
I have a report that has a label on it that is filled with some data. Beside
the label I have a line. Something like below
Label1 _____________________________
At design time the label has certain values for the properties left and
width. Using a pass thru function I update the caption of the label and want
the line next to it to move to the left or right accordingly. What appears
to be happening is the design values for left and width aren't updated so
therefore the line always stays in the same location.
I've tried adding code to OnStartSecondPass event plus a couple of others
but they make no difference.
Any ideas on how to fix this would be really appreciated.
Thanks
Stuart
I have a report that has a label on it that is filled with some data. Beside
the label I have a line. Something like below
Label1 _____________________________
At design time the label has certain values for the properties left and
width. Using a pass thru function I update the caption of the label and want
the line next to it to move to the left or right accordingly. What appears
to be happening is the design values for left and width aren't updated so
therefore the line always stays in the same location.
I've tried adding code to OnStartSecondPass event plus a couple of others
but they make no difference.
Any ideas on how to fix this would be really appreciated.
Thanks
Stuart
This discussion has been closed.
Comments
You will need to use the Report.Printer.Canvas methods to get the length of
the text field in printer pixels. Below is a link to an example that does
the same thing a little differently.
http://www.digital-metaphors.com/tips/TableOfContentsAligned.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com