NS button text interprets FontAwesome - nativescript

If I set the text of the Button whose font is FontAwesome to something like "Download" - it interprets 'down' as an font from FA as well as 'ad'
e.g. Open = it'll display O and then a pen icon from FA.
Very weird - how can I stop this.
I'd like the button text to contain both FA icons (specified with unicode escape codes) and regular text.

I haven't used FontAwesome recently, I recall they use to denote icons by character code so there were no issues in combining text along with icons, not sure if that's changed now.
As a workaround you can use formattedText instead of text. You will be able to use different fonts within Button with 2 different FormattedString definitions, one for icon and another for text.

Related

What is the offical way to tell Microsoft to fix bugs in Tab Common Control

There are obviously some bugs in Tab control of Common Controls 6
Here is my testing environment showing Tabs in often used way:
But when I switch to bottom aligned tabs, I get wrong aligned text here.
When I switch to left aligned view, it becomes more ugly. The underlined mnemonic char, represented with an ampersand in string and correctly interpreted is wildly shown at the end of the tab text and the tab is incorrectly dimensioned. The background colors of the tabs are not themed.
How can I tell Microsoft in an official way about the bugs?
CC6 tab control dropped support for everything except tabs on top. Sad but true.
This style is not supported if you use ComCtl32.dll version 6.

How to add TM symbol as a superscript to button text in vb6.0

I want to add TM symbol as a superscript to button text. Like "DemoTM" text and TM should be superscript of Demo text.
Any Solution would be great help.
Thanks
The Unicode superscript trademark is U2122 so
Button.Caption = "Demo" & ChrW$(&H2122)
You must obviously use a font that contains this glyph, for example MS Sans Serif does not, Segoe UI does.
No need to do this at run time.
Choose a Command button font that supports this symbol. Then in the Properties pane you can directly paste Demo™ for the Caption property's value.
If need be you can copy the character from the Character Map applet.
You can also paste this value into a source String literal if you want to do it at run time:
Command1.Caption = "Demo™"
No need for further gyrations.

Text should not be displayed behind the button VC++

I am designing a search text box, with close button at the end(will be shown when TextLength > 0).
But when entering lengthy text, the close button hide the last part of text. I need to restrict the text to not cross the close button.
Note: I dont wont to restrict the MaxLength of characters, but the max length of characters to be displayed inside the textbox.
It appears that the close button is overlapping the search text box.
If you are using MFC, then you can use CEdit::SetRect to set the formatting rectangle of edit text. If not MFC, then use EM_SETRECT message to do the same.
I have done similar stuff in my article here: http://www.codeproject.com/Articles/15043/iTunes-like-Find-Edit-Control

Display Emoji icons in Mac app

I want the user to have easy access to Emoji icons in a small chat I am making for the company I'm working at.
Therefore, I want to make a panel which shows the available Emoji icons. To do this, I am using an NSCollectionView. Now, I need to pass a string which is shown in an NSTextField. This string must contain one Emoji icon.
I can't figure out how to write this Emoji icon in unicode in a string. Everything I have tried just shows a strange symbol instead of the icon.
Can anyone tell me, how I can put an Emoji icon into an NSString?
📱 You want emoji 😄?
🐷🐻🐨🐸 They're in Unicode now 🐸🐨🐻🐷
If you open up the 💻Character Viewer💻 you can actually paste them directly into your source code. If you'd rather, you can encode them in hexadecimal (\U0001F431 for cat face) by looking them up in the Unicode code charts (especially the chart for the U+1F300 block).
If you want to make sure they appear in color, you'll need to select the "Apple Color Emoji" font for the Emoji. You can use NSAttributedString to set the font on a per-character basis.

How to get a superscript in Qt Creator for label text?

I am trying to create a superscript of a 2 to show something is squared for the units label that comes after a field the user supplies in my dialog. I am using Qt Creator v2.0.1 on Windows. The QLabel has a text field and a textFormat field. I attempted to solve this by setting the textFormat combobox to RichText and then set the textFormat field to be: "µm{\super 2}" however, when previewing my dialog, the text is taken literally and not as RichText and thus there is no superscript 2 but instead the '{super 2}' with the backslash removed. I also tried escaping the backslash with '{\super 2}' but I then the literal '{\super 2}' when previewing the dialog.
How can I specify the superscript to Qt Creator so that my dialog preview shows the superscripted 2?
Here is how I want it to look: µm2
Apparently html works (not sure why RichText did not):
µm<sup>2</sup>
I find another easier way which is similar to #WilliamKF solution but it is easier for me.
for example, we have one QLabel in our UI like this :
For adding I right-click on that label and choose Change rich text ... and I will see this Dialog.
There I can easily write what I want and add superscript like this:
Then if I click Ok I have what I want and also I can choose source to see HTML tags :
<html><head/><body><p><span style=" font-size:16pt;">µm</span><span style=" font-size:16pt; vertical-align:super;">2</span></p></body></html>

Resources