Align columns: Difference between revisions

Content added Content deleted
Line 3,631: Line 3,631:
NrSpaces = ColWidth(y) - len(LWord)
NrSpaces = ColWidth(y) - len(LWord)
'left align
'left align
TextLeft = TextLeft + LWord + String$(NrSpaces +1, " ")
TextLeft = TextLeft + LWord + Space$(NrSpaces+1)
'Right align
'Right align
TextRight = TextRight + String$(NrSpaces +1, " ") + LWord
TextRight = TextRight + Space$(NrSpaces+1) + LWord
'Center
'Center
TextCenter = TextCenter + String$(floor((NrSpaces)/2)+1, " ") + LWord + string$(Ceil((NrSpaces)/2), " ")
TextCenter = TextCenter + Space$(floor((NrSpaces)/2)+1) + LWord + Space$(Ceil((NrSpaces)/2))
next
next
TextLeft = TextLeft + Newline
TextLeft = TextLeft + Newline