Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right aligning a listbox column
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Right aligning a listbox column
Miscellaneous
Thread ID:
00239117
Message ID:
00239117
Views:
38
I need a function to calculate how many spaces I have to place in front of each number in a listbox column to have the numbers perfectly right-aligned inside the column. I don't want to have to use a fixed-pitch font.

The problem is that a space character is a fractional width of a digit in most fonts, so there is no integer amount of spaces that will pad a variable number of digits so the points align.

Has anybody solved this puzzle?
Vidar Johannessen
Reply
Map
View

Click here to load this message in the networking platform