Page 1 of 1

Euro symbol

Posted: Wed May 11, 2005 1:03 pm
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.

Posted: Wed May 11, 2005 2:35 pm
by Num3
LoL,

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

or

With the joystick UP UP LEFT RIGTH + FIRE ;)

Posted: Wed May 11, 2005 3:02 pm
by filperj
The problem may come from the fonts your system uses :roll:

Posted: Wed May 11, 2005 6:55 pm
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.

Posted: Wed May 11, 2005 9:25 pm
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?

Posted: Thu May 12, 2005 3:48 am
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))

Posted: Thu May 12, 2005 11:04 am
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.

Posted: Sat May 14, 2005 4:03 pm
by akj
Thanks, Sparkie. Avoiding the use of #PB_Any solved the problem.