FontAwesome in button titles, etc


#1

Is it possible to include the FontAwesome icons in button titles, menus and prompts? I’ve only been able to get the literal string for them to appear and not the icon.


Panorama X 0.1.027 Release Notes
#2

I don’t think you can do that with FontAwsome in a button title. You can however use an AppleColorEmoji as part of the title. Emojis can be pretty much mixed with any font and will show up properly. The trick is finding one that represents what you want to indicate. There are many various symbols and objects besides the more popular smiley faces to choose from.


#3

For what it’s worth I have made a small file with a simulated Push Button that allows for a FontAwesome icon to be in the title. The button will flash pretty much like a normal Push Button when clicked. You can get this zipped file here:

http://www.unseensoft.com/download/SimulatedButton.zip


#4

I’ll check it out.


#5

I create my own buttons - (grouped RSO & LSO) and place a TDO on top with my procedure code as a part of the TDO. This way I can use FontAwsome and/or WingDing fonts. The only problem with this is that if I delete any object on the form, or bring any object to front… my grouped buttons disappear - but when I quit and reopen Pan they are back. This is a carry over from Pan6 and my staff are used to these types of buttons.


#6

Font Awesome can only be used where rich text is allowed – which is basically just Text Display and Text List objects.

Hmm, I just realized it might be possible to get rich text to work in menu items and buttons, I’ll have to put that into the “that would be cool someday” pile :slight_smile: In fact, just so I don’t forget, here we go:

https://bitbucket.org/jimrea/panoramax/issues/557/rich-text-in-buttons-and-menu-items


#7

I like the idea of it being in the “that would be cool someday” pile. Works for me!


#8

I just couldn’t get this fantastic idea out of my head, so here you go!

and

Here is the code for setting up this menu, to enable rich text, set the font to #rich or #richtext.

For push buttons and data buttons it is enabled with a checkbox.

@JamesCook – thanks for the “awesome” idea!!

Hmm, in your original message you asked about button titles, menus and prompts. What did you mean by “prompts”? If you meant alerts, like the message statement, unfortunately Apple does not support rich text in alerts.


#9

I love it! And I’m glad you thought it was a fantastic idea.

By Prompts, I was referring to the ToolTips in the Attributes but used the wrong word. The only reason ToolTips was included in the original note was that it’s one of the available cells in the Setup, along with Name, etc. I don’t have an immediate purpose for that one, as I do for buttons and menus.


#10

Actually, now that you mention it, it would be awesome if rich text could be used in Tool Tips. Unfortunately, Apple allows only plain text there as well.


#11

Emojis can be included in Tool Tips…


#12

From a programming point of view, emojis actually are plain text – they are just part of Unicode. However, good point.