[Q] Unicode characters as Button text

  • Thread starter Thread starter Stuart Norris
  • Start date Start date
S

Stuart Norris

Hi All,

I am new to csharp and Visual Studio and trying to learn.

I would like to have a button with an up arrow as it "label" instead of text?

Is this possible using the normal button in System.Windows.Forms.Button?

I wish to use Unicode 21E7 from the Arrows Range 2190-21FF.

How do I define the button to use a unicode character as its "label"?

this.button.Text = "";

Thanks

Stuart
 
Hi Stuart,

You can write unicode characters as \u####, so in your case

this.button.Text = "\u21E7"; // or \u21e7
 
Stuart Norris said:
I am new to csharp and Visual Studio and trying to learn.

I would like to have a button with an up arrow as it "label" instead of text?

Is this possible using the normal button in System.Windows.Forms.Button?

I wish to use Unicode 21E7 from the Arrows Range 2190-21FF.

How do I define the button to use a unicode character as its "label"?

this.button.Text = "";

Well, in theory,

this.button.Text = "\u21e7";

should work, but I don't know if it'll work - it'll depend on whether
the font used for the button contains that character.
 
Back
Top