devxlogo

Misalignment of Columns

Misalignment of Columns

Question:
I try to align numeric numbers in columns (to be right-justified). Hwvr, some of the numbers don’t right-justify very well. In my example, most of these numbers hve 2 digits. Typically, numbers with 3-digits srick out a little to the right. Alpha values also stick out to the right.I can’t figure out why. Can you help me? This is my first VB project at work. Don’t want to mess up this opportunity.

Answer:
I’ll assume that your code works since you are getting some output. What font are you using? I would imagine that you are using a proportional font like Times or something else that doesn’t use a fixed width like Courier New. Try it with a fixed-width font and I would imagine that things will line up.

See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist