0

In Visual Basic.net I managed to get this little arrow symbol in the TextBox some time ago, but lost it.

Is this font dependent? I used Consolas and Courier New. Do i need a RichTextBox or something else?

I tried chr(10) and chr(13), environment.newline and vbLf, vbCr and what else but I'm lost.

I just want to have that special character to be visible for "debug purposes". My system is UTF capable.

Jamie Taylor
  • 4,709
  • 5
  • 44
  • 66
LAamanni
  • 177
  • 2
  • 13

2 Answers2

3

The TextBox does not display unprintable characters, like most text editors can do.

You can, however, simply insert the symbol yourself, be replacing each newline character with and a newline character.

Example:

Dim f = New Form()
Dim txt = New TextBox() With { .MultiLine = True, .Dock = DockStyle.Fill}

Dim text = <text>This is just
                 some multine text
                 to be displayed</text>.Value

txt.Text = Regex.Replace(text, "(\n\r|\r|\n)", "↵$1")

f.Controls.Add(txt)
f.ShowDialog()

Result:

enter image description here

sloth
  • 99,095
  • 21
  • 171
  • 219
  • Thanks, this will do the trick! Somehow I managed to do this in some other way also but how, that remains as a mystery. (Like I mentioned I forgot the code allready) – LAamanni Sep 20 '13 at 07:22
2

This is a standard character, no fancy fonts required.

Here's all you could wish to know about it..

Encodings

HTML Entity (decimal)   &#8629;
HTML Entity (hex)   &#x21b5;
HTML Entity (named) &crarr;
How to type in Microsoft Windows    Alt +21B5
UTF-8 (hex) 0xE2 0x86 0xB5 (e286b5)
UTF-8 (binary)  11100010:10000110:10110101
UTF-16 (hex)    0x21B5 (21b5)
UTF-16 (decimal)    8,629
UTF-32 (hex)    0x000021B5 (21b5)
UTF-32 (decimal)    8,629
C/C++/Java source code  "\u21B5"
Python source code  u"\u21B5"
Alec.
  • 5,371
  • 5
  • 34
  • 69
  • My textbox is readonly and I write to it in my code. I write CR/LF to end of every line. But I can't see that symbol in the text box. I know this should be possible somehow. But normally it doesn't appear there, of course. – LAamanni Sep 19 '13 at 11:36