Use this function to stretch a text. Stretch function inserts spaces and tabs into the text and returns a longer text
that fits in a specified number of twips.
Syntax:
Stretch(InputStr, MaxLenght, FontName, FontSize, FontBold, OpenSign, CloseSign)
InputStr is the original text that must be transformed.
MaxLength is the maximum width for the text to be handled. The width of the original text (InputStr) must be lower than MaxLength value. See
TextWidth and WordWrap if you need to know the width of your text or want to split it.
FontBold is expresed as 0 (zero) = normal and 1= Bold.
OpenSign and CloseSign are the signs used in your Rpv report to open and close Rpv commands. These are "{" and "}" normally but you may have changed them using Open and Close settings in your report.
Example:
NewText = Rpv1.Stretch(Normal_text, 8000, "arial", 12, 0, "{", "}")
Normal_Text = "This is an example"
NewText = "This{Tab=250}is an example"
It is remmarkable that Stretch measures the text based on the printer. For that reason,
you could note some differences between what you see and what you get
printed. If printer is not installed or it is not reachable by the
control, the measurement will be based on the screen. However,
differences may appear when zooming in and zooming out. |
|