home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / tools / 1953 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  2.0 KB

  1. Path: sparky!uunet!olivea!pagesat!a2i!shakala!donh
  2. From: donh@shakala.com (Don Hackler)
  3. Newsgroups: comp.os.ms-windows.programmer.tools
  4. Subject: Re: Visual Basic Win 2.0
  5. Message-ID: <X0s5wB4w165w@shakala.com>
  6. Date: 9 Jan 93 22:49:56 GMT
  7. References: <1993Jan8.223222.16819@news.ysu.edu>
  8. Organization: Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
  9. Lines: 43
  10.  
  11. af734@yfn.ysu.edu (Andy Klein) writes:
  12.  
  13. >      I'm using Visual BASIC Standard Edition v2.0 and I've run into
  14. > the following dilemma.  I'm trying to create an array of string by
  15. > concatenating two other values together, but would like the two
  16. > columns of data to each be left justified.  However, the font that
  17. > I am using contains letters of different widths.  For instance,
  18. > assume an array of strings called Names$() and an array of integers
  19. > called Num%() contain the following made-up data:
  20. >  
  21. >      Names$(1) = "Samuel"          Num%(1) = 15
  22. >      Names$(2) = "Richard"         Num%(2) = 3
  23. >      Names$(3) = "Al"              Num%(3) = 221
  24. >      Names$(4) = "James"           Num%(4) = 54
  25. >      Names$(5) = "Bob"             Num%(5) = 11
  26. >  
  27. > I would then like to create a second string array called Results$()
  28. > that contained the following:
  29. >  
  30. >      Results$(1) = "Samuel   15"
  31. >      Results$(2) = "Richard  3"
  32. >      Results$(3) = "Al       221"
  33. >      Results$(4) = "James    54"
  34. >      Results$(5) = "Bob      11"
  35. >  
  36. > My problem is that since the characters in MS-Windows aren't all
  37. > the same pixel width, the column of numbers is not vertically lined
  38. > up correctly when I print the results.  Is there a way to get the
  39. > second column of numbers to be lined up?  Thanks,
  40. > Andy Klein
  41.  
  42. Print them separately so that the second column can be positioned
  43. independently of the first.
  44. - or -
  45. Use a fixed-width font (such as one of the Courier variations)
  46. so that the columns line up automatically.
  47.  
  48. - don
  49.  
  50. ------------------------------------------------------------------
  51. Don Hackler  - donh@shakala.com 
  52. Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
  53.