Label and & character

I have noticed that it’s not possible to show & in a label like:

Label1.Text = “Me & you”

shows “Me you”

using TextField or Title it works fine. Have tried converting encodings but doesn’t seems to help.

“Me && you”

& is special (used for keyboard accelerators on Windows), so enter &&

That will be a problem for displaying strings like nativepath, will have to replace this character.

Is there any other special character I sould take care of?

You could replace it with Label1.Text = “Me “+chr(38)+” you”

Take a look at:

Looking at the closed feedback reports (“by design”) I have to wonder why this is not considered a bug. The answers always seem to miss the problem, e.g.

“& is a reserved character in menus. On windows (and possibly Linux) it is used to show that the following letter should be used an an access key. For example &Print in a menu would show on those platforms as Print (with the P underlined). On Mac the & is ignored to better support cross platform compatibility. If you place two & in a row it will show as one in your menu.”

A Label isn’t a menu, so why is a Label not showing the Ampersand?

Is the rule basically “if the user can enter the text then we honour the ampersand, everywhere else we don’t”?

Windows has that concept that a label next to a textfield can provide a key with & to jump to the textfield.
And for that we need the & being handled special.
(although I never used that feature)

May be adding a parameter to labels like “use as access key” and disabled by default would solve it. Most probably only 0,1% are used this way.

( or you could read the manual and know that’s how Xojo behaves )