Bharat_Naik
Senior Member Members
    Offline
 Ever ready to learn and share
Posts: 1202
Location: Chicago, Illinois
Joined: Dec 16 th, 2003
|
Concatenate two strings while using PrintString()
May 22nd, 2008 at 9:43pm
|
Print Post
|
While Concatenating two strings using PrintString ( ) command, 2nd string is treated as the column eventhough Width in the column specification is 0. This is obvious when the second string is quite long so as it is required to be wrapped.
var vString1 as String = "This is test String1." var vString2 as String = "This is testString2. Let us see how does this concatenate with printString command. The second string is treated as the last column from the starting postion."
NewPage (850, 1100) PrintPageMargin (36, 36, 36, 36) AlternateDefaultPrinter ("Adobe PDF") Printstring (vString1, 0, 0, 0, " Arial", 17, 0) PrintString (vString2, -1, -1, 0, " Arial", 17, 0)
FinishPage ( )
Expected: This is test String1.This is testString2. Let us see how does this concatenate with printString command. The second string is treated as the last column from the starting postion.
Instead of above, I am getting 2nd string as the last column starting from the end of first string.
Is this Aberrant behavior? I understand, I can always concatenate them before using it in the printstring () command in order to get it right.
Printstring (vString1+ " " + String2, 0, 0, 0, " Arial", 17, 0)
|