INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: r_harms on April 10, 2012, 11:29:13 am

Title: How to Right Justify Numeric fields in List Views?
Post by: r_harms on April 10, 2012, 11:29:13 am
Well the subject says it all. I'm hoping there is an easy way I'm overlooking.

Thanks all for the help!

Rick
Title: Re: How to Right Justify Numeric fields in List Views?
Post by: BryanC on April 10, 2012, 11:33:47 am
This is as close as I got:

http://yabb.jriver.com/interact/index.php?topic=67248.0
Title: Re: How to Right Justify Numeric fields in List Views?
Post by: MrC on April 10, 2012, 12:14:41 pm
Here's a close approximation:

Create a field called _Spaces, a Calculated field, whose value contains about 50 underbars (for now).  Now use an expression such as (using Artist here, but you can use any field such as Track #):

   mid([_Spaces], 1, math(40-Length([Artist])))[Artist]

and you can see that it works, mostly.  Note, I've not dealt with overflow (eg length of artist > 40).  Unless you use a fixed-width font in the UI, things will never line up with this method.

Replace the string of underbars with spaces at your convenience.

It would be nice if column control in views had left, right, or center justification.
Title: Re: How to Right Justify Numeric fields in List Views?
Post by: rick.ca on April 10, 2012, 03:51:02 pm
Good illustrations of how far some users are will to go to get what they should have in the first place. ;D

Quote
It would be nice if column control in views had left, right, or center justification.

That would be nice. But in list views numeric fields should be right justified by default (with decimal fields displayed with a fixed number of decimal places).
Title: Re: How to Right Justify Numeric fields in List Views?
Post by: vagskal on April 10, 2012, 05:27:33 pm
in list views numeric fields should be right justified by default (with decimal fields displayed with a fixed number of decimal places).

Indeed!