Recent

Author Topic: ^&  (Read 4016 times)

w click

  • Full Member
  • ***
  • Posts: 205
^&
« on: March 05, 2012, 04:39:43 pm »
I'm writing a program on two different computers, Windows XP and Windows 7, with the code sitting on a datastick.  I need to put "^&" as part of a string in a showmessage.  On the Windows 7, it's fine, but on the XP machine it underlines the next character.  I can get around it by putting two &s, but that create two &s on the... like this.


String   XP   Windows 7
A^&B    A^B   A^&B
A^&&B   A^&B  A^&&B


I'm trying to get "A^&B" - I've tried all sorts of tweaks, but can't a solution.  Any ideas?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: ^&
« Reply #1 on: March 05, 2012, 04:52:35 pm »
If you're using the same version of Lazarus, it's a bug. I'd first check if you both have the same version.

& is meant to underline the next line in captions etc. && is indeed the way to escape this.

I'd suggest searching the bugtracker to see if the error is already reported. If not, create a simple test program, and upload it with a bug report to the bug tracker (making sure to mention the details of the machine it works on and the one it doesn't).
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: ^&
« Reply #2 on: March 05, 2012, 05:46:41 pm »
As a temporary work around you can get the Windows version and do something different for major version <= 5 (Windows XP) then for newer ones.

w click

  • Full Member
  • ***
  • Posts: 205
Re: ^&
« Reply #3 on: March 05, 2012, 06:11:03 pm »
Lazarus versions: good thought.  I'm on 0.9.20 (2011-03-08) here, so I'll see what the other machine has to say for itself.

I did create a workaround using a memo pretending to be a showmessage (and then went mad a stuck it in a pagecontrol, so it's all much more exciting that a simple showmessage now).

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: ^&
« Reply #4 on: March 05, 2012, 06:27:09 pm »
Lazarus versions: good thought.  I'm on 0.9.20 (2011-03-08) here, so I'll see what the other machine has to say for itself.

I did create a workaround using a memo pretending to be a showmessage (and then went mad a stuck it in a pagecontrol, so it's all much more exciting that a simple showmessage now).
try update your lazarus, current is 0.9.31 and there are a lot of changes in between.

w click

  • Full Member
  • ***
  • Posts: 205
Re: ^&
« Reply #5 on: March 05, 2012, 06:36:37 pm »
That's good advice, thanks.

And maybe it'll fix the slidebar issue ;-)

 

TinyPortal © 2005-2018