<-- Previous || Up || Next -->

Fill Text Function
Formats Justifies Class

Public Function FillText( _
      ByVal vValue As Variant _
    , ByVal vWidth As Variant _
    , Optional ByVal vBiasLeft As Variant _
    ) As Variant

Spreads out the words of a string so that the string length is exactly vWidth.

Top20: This function is among our "top-twenty" most useful.
    FillText("     This is a test.", 23) = "     This  is  a  test."
    FillText("This is a long line.", 10) = "This is a long line."
    FillText("LineWithNoSpacesHere", 60) = "LineWithNoSpacesHere"
See also:
    JustifyText Function
    WrapText Function
vValue: String containing words which will be spread-out if the length of the string is less than the desired length of the line. Function returns Null if vValue is Null or cannot be fixed up to a String.

vWidth: The desired width of the string after the addition of intra-line spaces. vWidth defaults to 60 (sixty) characters if it is Null or cannot be fixed up to a number.

vBiasLeft: True to have words biased towards the left--space will be added to the right side of a word when there is a choice. vBiasLeft defaults to True if it is missing or Null or cannot be fixed up to a number.

Note: Function returns vValue unchanged if the length of vValue is greater than the desired width vWidth, or if there are no spaces within the line.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.