Euro symbol

Just starting out? Need help? Post your questions and find answers here.
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Euro symbol

Post by akj »

I wish to add text lines to a ListIconGadget, some of which need to contain the Euro symbol. I though Chr(128) would work, but it does not display correctly. How can I resolve this?
I use PureBasic 3.93 running under Windows ME.
Anthony Jordan
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

LoL,

Try ALT GR + e ;) it's the euro symbol combo...

or

With the joystick UP UP LEFT RIGTH + FIRE ;)
filperj
User
User
Posts: 77
Joined: Tue Sep 16, 2003 8:53 pm
Location: Nevers(France)

Post by filperj »

The problem may come from the fonts your system uses :roll:
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Just hard-coding the € works for me. If I debug asc("€") it says 128 so using chr(128) should work. It is most likely the font.
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Post by akj »

Thanks everyone for your help, but nothing you've suggested is working for me.

I've tried altering my ListIconGadget font, for example using:

Code: Select all

SetGadgetFont(#MyGadget, LoadFont(#PB_Any,"Symbol",10))
But whichever font I use (even the inappropriate Symbol font, as above), the ListIconGadget text is totally unchanged each time with the Euro symbol always displaying as a short, fat vertical bar. I've checked that the FontId is non-zero as it should be.

I've tried Chr(128) and AltGr E and AltGr 4 within text strings, but to no avail.

Trond, you say "just hard-coding the € works for me". But did you actually try it out in a ListIconGadget in report mode? This is the context I'm needing to use.

I would welcome any small snippet of PB code generating a ListIconGadget containing text having the Euro symbol within it. Then at least I would have something known to work. Can anyone help me there?
Anthony Jordan
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

akj wrote:But whichever font I use (even the inappropriate Symbol font, as above), the ListIconGadget text is totally unchanged ...
#PB_Any and LoadFont doesn't work here either. Try this...

Code: Select all

SetGadgetFont(#MyGadget, LoadFont(0,"Arial",10))
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Trond, you say "just hard-coding the € works for me". But did you actually try it out in a ListIconGadget in report mode?
Report mode? I tried it out in a ListIconGadget, yes. Both in the grey header and in a "cell".

EDIT: Yes, report mode.
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Post by akj »

Thanks, Sparkie. Avoiding the use of #PB_Any solved the problem.
Anthony Jordan
Post Reply