eddy white
eddy white

Reputation: 303

some unicode arrow look strange in C#

I am using Visual Studio 2010 with C#

Buttons

    btnAddAll.Text = "\u21C9";
    btnRemoveAll.Text = "\u21C7";

Font is default: Microsoft Sans Serif

My question is about the look of the first and last button and how to fix this.

Upvotes: 0

Views: 2917

Answers (1)

HelloWorld
HelloWorld

Reputation: 1103

This is a code I just wrote and it works perfectly, try it;

button1.Text = "\u21C7";
button1.Font = new Font("Microsoft Sans Serif", button1.Height / 2);
button1.TextAlign = ContentAlignment.TopCenter;
button2.Text = "\u2192";
button2.Font = new Font("Microsoft Sans Serif", button1.Height / 2);
button2.TextAlign = ContentAlignment.TopCenter;
button3.Text = "\u2190";
button3.Font = new Font("Microsoft Sans Serif", button1.Height / 2);
button3.TextAlign = ContentAlignment.TopCenter;
button4.Text = "\u21C9";
button4.Font = new Font("Microsoft Sans Serif", button1.Height / 2);
button4.TextAlign = ContentAlignment.TopCenter;

This is how it looks like:

enter image description here

Upvotes: 1

Related Questions