Using StringFormat.SetTabStops(), is it possible to align tabs?
-
12-10-2019 - |
문제
I'd like to be able to align the tabstops I use in a StringFormat
(set with the SetTabStops()
method)
Is this possible?
해결책
See (Update: Didn't help much as per comments below)
- Is there an easy way to create two columns in a popup text window?
- http://msdn.microsoft.com/en-us/library/system.drawing.stringformat.settabstops.aspx
- http://www.java2s.com/Code/CSharpAPI/System.Drawing/StringFormatSetTabStops.htm
- http://support.microsoft.com/?kbid=318601
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.
제휴하지 않습니다 StackOverflow