INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to Right Justify Numeric fields in List Views?  (Read 1523 times)

r_harms

  • Junior Woodchuck
  • **
  • Posts: 67
How to Right Justify Numeric fields in List Views?
« 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
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2678
Re: How to Right Justify Numeric fields in List Views?
« Reply #1 on: April 10, 2012, 11:33:47 am »

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: How to Right Justify Numeric fields in List Views?
« Reply #2 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.
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: How to Right Justify Numeric fields in List Views?
« Reply #3 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).
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: How to Right Justify Numeric fields in List Views?
« Reply #4 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!
Logged
Pages: [1]   Go Up