dashman
dashman

Reputation: 3028

How to display unicode char on a Button label

Trying to set a button label text to a unicode char. It's not working.

bttn.text = "\uf0f6";

bttn.text = "";

Help appreciated!

Upvotes: 2

Views: 782

Answers (1)

Marek Maszay
Marek Maszay

Reputation: 1557

You can check it here https://docs.nativescript.org/ui/icon-fonts If it's icon did you set font file for it ? Try set it with this

 bttn.set("text",String.fromCharCode(0xf0f6));

Upvotes: 4

Related Questions