TIP: Using Unicode chars as icons
devin_asay at byu.edu
Fri Oct 28 11:24:44 EDT 2011
On Oct 28, 2011, at 3:48 AM, Michael Kristensen wrote:
> Hi there
> Icons can be quite space-saving and also pleasing to the eye.
> But somtimes the hazzle of making the icon in a paint app and import it into Livecode and keep it in a hidden place is to much.
> On a Mac there is a palette calle "Keyboard".
> It can show the thousands of chars/symbols in a Unicode font.
> Im sure you can find a symbol there that suits you.
> The trick is to add the char to the label of the button, not the name.
> Scale the char/icon by ajusting the textsize and color it as you please.
Thanks for a nice tip, Michael. It is possible to take this one step further, to address the possibility that the end user of your stack does not have the same fonts installed on their system as you do. You can easily turn any character from any font into an image without leaving LiveCode. Simply create the character in a field, make it transparent and turn off its border. Then issue the command:
import snapshot from field "whereTheSymbolIs"
This creates an image object on the card that looks exactly like the field, no third party image editor needed!
Humanities Technology and Research Support Center
Brigham Young University
More information about the Use-livecode