PDA

View Full Version : TextAlign for specific columns in a ListBox



Dr.K
04-01-2009, 01:37 PM
I don't suppose its possible to assign a text alignment for EACH column in an MS Forms ListBox?

The form itself has a .TextAlign property, but that gets assigned to all columns. I'm mixing numerical and text data in the list, so it would be nice to have some columns Left-Justified and others Right-Justified.

I'm pretty sure that this is impossible. A miracle, please?

p45cal
04-01-2009, 03:02 PM
see if http://www.excelforum.com/excel-programming/398555-alignment-and-format-in-listbox-columns.html helps

Dr.K
04-01-2009, 04:01 PM
The "ListView" control sounds intriguing, but I'm afraid to dig too deep into that toolbox because my company has not yet completed our Office 2003 transition yet. :(



You would
need to simulate alignment with embedded spaces.


Yep, thats the conclusion I came to.

Unfortunately, even though I'm already using the proportional font, some of the data is not from a DB, so there is no defined field size. Any magic tricks pulled with space padding will vary from run to run, so I'm better off just leaving everything left justified.

A little more attention to number formatting should make things clearer for the end user.

Thanks for the link!