0

I'd like to be able to align the tabstops I use in a StringFormat (set with the SetTabStops() method)

Is this possible?

ocodo
  • 29,401
  • 18
  • 105
  • 117
  • Some tabbing systems allow you to align a tabstop, left/right/central. for example... http://t2.gstatic.com/images?q=tbn:gn3m_Q1whg_u_M:http://www.geekgirls.com/images/ruler02.jpg&t=1 – ocodo Dec 23 '10 at 00:04
  • (left, right or near, far if you follow the `StringAlignment` model.) – ocodo Dec 23 '10 at 03:54

1 Answers1

1

See (Update: Didn't help much as per comments below)


Or, as I commented further and recommend by yourself :)

In String.Format I don't think so as all it specializes in is replacing {n} parts with different formatters. One thing you may be able to do is to split the string by '\t', and apply .PadLeft() or .PadRight() to each and then string.Join() them, or use any of the suggestions above, but, string.Format is likely dead end for this one.

Community
  • 1
  • 1
Meligy
  • 35,654
  • 11
  • 85
  • 109
  • Please forgive me, I already know how to use `SetTabStops` to setup basic near aligned tabs, I am wondering if there is an in-built mechanism for aligning a tab centrally or far, as well as near. – ocodo Dec 23 '10 at 03:53
  • In String.Format I don't think so as all it specializes in is replacing {n} parts with different formatters. One thing you may be able to do is to split the string by '\t', and apply .PadLeft() or .PadRight() to each and then string.Join() them, or use any of the suggestions above, but, string.Format is likely dead end for this one. – Meligy Dec 23 '10 at 04:53
  • Make ^ this your answer, and you get a shiny up-vote and a green check. – ocodo Dec 29 '10 at 08:29