Public Function JustifyText( _ ByVal vValue As Variant _ , ByVal vWidth As Variant _ , Optional ByVal vCodes As Variant _ , Optional ByVal vFillString As Variant _ ) As Variant
JustifyText("This is a test.", 20, JustifyRight, "-") = "-----This is a test." JustifyText("This is a test.", 18, JustifySpread, " ") = "This is a test."See also:
JustifyLeft Property, et. al. FillText Function WrapText Function FormatVariantMatrix FunctionNote: See the WrapText function which will format a string containing more than one line of text.
vValue: String containing the line of text which is to be justified. Function returns Null if vValue is Null.
vWidth: The desired length/width of the string after it has been formatted. Function returns Null if vWidth if Null or cannot be fixed up to a String.
vCodes: Any meaningful combination of the formatting codes available through the Justify properties of this Class. Defaults an empty string (the absence of any specific formatting codes) if vCodes is missing or Null or cannot be fixed up to a String.
vFillString: The string used to fill vValue if its length is less than the desired width vWidth. vCodes defaults to the space character (Chr$(32) if it is missing or Null or cannot be fixed up to a String.
Function returns Null if vValue cannot be fixed up to a String.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.