vb.net - String Padding not producing desired even alignment -
vb.net - String Padding not producing desired even alignment -
my desired end result alter strings (used in message box) from...
kiwi: greenish orange: orange
...to...
kiwi: greenish orange: orange
applying padright()
first column (e.g. "kiwi:"
) almost works, however, default font, microsoft sans serif, doesn't have evenly spaced characters sec "column" isn't applied.
does there exist prepare aligning sec "column"?
other attempted solutions:
i haven't been able figure out how alter font (i.e. character width font) of message box though undesirable in inconsistent rest of application. programmatically generating list view or grid view container in programmatically generated dialog box seems long-winded. i'm hoping simpler alternative.
if constructing own messagebox seems bit excessive, seek this:
messagebox.show(string.format("kiwi:{0}green{1}orange:{0}orange", vbtab, vbnewline))
it's not perfect solution, it's simple one.
vb.net winforms visual-studio fonts padding
Comments
Post a Comment