🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.visual
1 messages
1 total messages Started by Andy Klein Fri, 08 Jan 1993 22:38
VB Win 2.0 Question
#63
Author: Andy Klein
Date: Fri, 08 Jan 1993 22:38
29 lines
1725 bytes
     I'm using Visual BASIC Standard Edition v2.0 and I've run into
the following dilemma.  I'm trying to create an array of string by
concatenating two other values together, but would like the two
columns of data to each be left justified.  However, the font that
I am using contains letters of different widths.  For instance,
assume an array of strings called Names$() and an array of integers
called Num%() contain the following made-up data:
 
     Names$(1) = "Samuel"          Num%(1) = 15
     Names$(2) = "Richard"         Num%(2) = 3
     Names$(3) = "Al"              Num%(3) = 221
     Names$(4) = "James"           Num%(4) = 54
     Names$(5) = "Bob"             Num%(5) = 11
 
I would then like to create a second string array called Results$()
that contained the following:
 
     Results$(1) = "Samuel   15"
     Results$(2) = "Richard  3"
     Results$(3) = "Al       221"
     Results$(4) = "James    54"
     Results$(5) = "Bob      11"
 
My problem is that since the characters in MS-Windows aren't all
the same pixel width, the column of numbers is not vertically lined
up correctly when I print the results.  Is there a way to get the
second column of numbers to be lined up?  Thanks,
Andy Klein
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads