Showing the £ sign inplace of $ sign

Have a user in the UK who would like to be able to show the £ sign in place of the $ sign.

I found this in the Xojo reference:
Although the special formatting characters are U.S. characters, the actual characters that will appear are based on the current operating system settings. For example, Windows uses the settings in the user’s Regional and Language Options Control Panel. Formatting characters are specified in similar ways on other operating systems.

I ask him if his did this and his reply was: NO

Is this automatic of do I have to do something in code fin my app?

It’s automatic. Assuming you’re using Format or the equivalent.

[quote=261219:@Jim Smith]I ask him if his did this and his reply was: NO
Is this automatic of do I have to do something in code fin my app?[/quote]

You asked if he did what? Set his OS to have the UK as locale? If he did not, this is why …
You as a developer don’t have to do anything, but he as the end-user does… he has to tell the OS where he is in “Regional Settings” or the equivalent for his OS.

For the money symbol in my testing that appears n0t to be the case

I set mt system to UK and
Msgbox Format(10.00,"\$0.00")
yields “$10.00”

[quote=261223:@Karen Atkocius]For the money symbol in my testing that appears n0t to be the case

[/quote]
That’s not really surprising given that there is no “Special Character” for currency. The “” denotes a literal.

To get the correct currency symbol you can use

MsgBox(Format(10.00, "\" + xojo.Core.Locale.Current.CurrencySymbol.ToCString(xojo.Core.TextEncoding.UTF8) + "0.00"))

That is awfully inconvenient for a RAD tool… Seems to me that Format should just handle that as it does decimal points and separators.

Seems like a good feature request for someone who cares enough about it…

  • karen

I can certainly agree with that, but I’m not that someone.

[quote=261227:@Karen Atkocius]That is awfully inconvenient for a RAD tool… Seems to me that Format should just handle that as it does decimal points and separators.

Seems like a good feature request for someone who cares enough about it…

  • karen[/quote]

Currency.ToText functions can be used to provide locale-aware formatting of currency values. The other integer and floating point ToText functions can do the same thing if you pass “¤#,##0.00” as the format.

I would have to change all my “Format” code to use “ToText” functions and use the “¤” symbol to have this work?

Where is the “¤” on the US keyboard?

check this keyboard shortcuts

For example you can progamaticly change textfield1.format = “\£###0

Why not do that?

If UserDoesRequestPoundSymbol then textfield1.format = "\\£###0" end if

  • copy and past the “pound” symbol from here: £

I personally would recommend a preference option with a combo box for the currency.

I also really like Apple Numbers for the fact that I can specify many different currencies in the same sheet/page.

All of our income is in $US, but taxes have to be filed in the local currency $NT. When you spend more on tax than you make, it’s a bit freighting, but with the correct currency symbol it’s not.