Set the ColumnWidths property to a comma-delimited list of the required widths (in pixels) of each column. The actual widths are not critical -- the point is that you put some value in this property.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
If you are using a cursor or an array to populate the listbox, you could explicitly convert the amount to a right-justified string, for example using TRANSFORM(Amount, "999,999.99") or something similar.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Again that kind of works. But when you look at the data in a listbox, an amount of 7.50 is offset to the left of an amount of say 55.50 - the decimal points aren't aligned. It looks like the column is left justified.
Ah yes, I forgot to say that I wanted the multi-select capability of the listBox . I seem to remember seeing various posts here about doing that with grids so I might have a look.
You might try building a function that prepends spaces to the display string until a certain width is met, or slightly exceeded. You can use the form's .TextWidth method to determine the length of the string given the current form's font settings. I still don't think you'll get exact, but you can get fairly close.
--------------
Good Luck To get the most from your Tek-Tips experience, please read
FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.