Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Align decimal values in a multi-column listbox
Message
From
16/10/1998 14:21:15
 
 
To
16/10/1998 13:30:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00147592
Message ID:
00147625
Views:
35
>In VFP6, I have a listBox with 5 columns. One column contains costs, that is, numeric values with 2 decimal places. I can't seem to make the decimal points line up. I've tried TRANSFORM to no avail. I really don't want to resort to a fixed-spacing font. Does anybody know how to make the decimal points line up, or how to right-justify one column in a listBox?
>
>As always, TIA for any ideas. I've really appreciated all your help over the last few months.
>
>Regards,
>Patricia

Hi Patricia,

Probably the best idea is Bruce's. Use a grid with properties set to look like listbox. If you're clever, you can make it do pretty much everything a listbox can do with some advantages, but it takes some thought and coding.

I have gotten numeric lists to line up almost exactly in listbox columns, but you have to do some fancy parsing of the character form of the numbers along with the TEXTWDTH() function with some calculations and PADR() or PADL() to get the right number of spaces inserted to get the numbers to line up. After doing it, I decided it wasn't really worth the effort. you could create a grid sub-class to look like a listbox to do this then use it over again.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform