RPV Reports / Home
 
Search in RpvSoftware.com
Go!

What Rpv is

Rpv Reports 6

Downloads

Support

Buy now!

Contact us

 

ForceToFit function. RpvCorporate.ocx control.


Returns a number that indicates the size of the font (in points) to fit a text in a specified space. Use this function to increase or decrease the size of your font to fit your text in a specified space.

Syntax:

ForceToFit(InputStr, MaxLenght, FontName, FontBold)

InputStr is the original text that must be transformed.
MaxLength is the maximum width for the text to be handled (in twips).
FontBold is expresed as 0 (zero) = normal and 1= Bold.

Example:

NewSize = Rpv1.ForceToFit("This is an example", 1000, "arial", 0)

ForceToFit will return 5.76 (points) and that size must be used to fit the text in 1000 twips like the following.

{s=5.76}This is an example

It is remmarkable that ForceToFit 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.

Home
What Rpv is
Rpv Reports 2024

Products
Rpv Reports 2024
Personalized edition

More...
Downloads
Support
Rpv Reports Online help
Rpv Visual Editor online help
Examples
/temp section
Videos




Copyright (c) 2001-2024 - Rpv Software. All rights reserved.