0

Ive been recently using FLTK with c++ for a few weeks. All is great.

For some odd reason I'm having trouble displaying characters like "@" and "."

For example: If i try to display an email address as FL_Box->label("test@test.com") only "test" appears. Now i know "@" is a formatting character. I tried replacing the @ with "@@" to make it display properly.

I also tried turning off formatting using "@." and still doesn't work, when i do either of those the label displays a load of garbage data.

Any ideas?

Thank you.

user3284667
  • 71
  • 3
  • 9
  • Are you running on Windows, Linux or Mac? @. Works on Windows and Linux - don't know about Mac. – cup Oct 17 '14 at 19:03
  • You could try label.cxx in the fltk test directory. Uncomment the #if 1 to try out the @. – cup Oct 18 '14 at 12:55
  • thanks for the info @cup. I solved it anyway. For those who are having the same problem it was because i was changing labels inside a function or class to a local variable, then the variable went out of scope and destroyed, fltk would still try and use the reference to the variable. this was unclear at first. i asssumed it made a copy. anyhow simply change widget->label(myVar); to widget->copy_label(myVar); – user3284667 Oct 24 '14 at 18:53

0 Answers0