vb.net - new - vbtab example




How do you enter a tab character in Textblock? (3)

Or a more .Net-y way:

Convert.ToChar(Keys.Tab)

Is it possible to add a tab character into a textblock? It's a textblock in Xaml, but i'm adding the text in code, so it has to be done there. Is there any action like "Environment.NewLine", but for the "Tab" character?

Thanks in advance.


Sure just use:

Chr(9)

Example:

TextBox1.Text = "hey" + Chr(9) + "you"

You can use the vbTab constant from the Microsoft.VisualBasic namespace.





tabs