how to print semicolon in an annotation

Hello,

I have a string which containts a semicolon, which i know is treated by IGOR as a list. When I try to place this string in an annotation, it only adds the portion up until the semicolon. For instance, if I try

textbox/c/f=0 "Hello, this is a string; which has a semicolon."


The textbox will only contain "Hello, this is a string"

Is there a way to have IGOR print this semicolon like how you can do \\r to have "\r" appear in the annotation? I know I could append the separate strings from the list, but I still want the semicolon in the final annotation.

Thanks
When I just now tried this:
display
textbox/c/N=text0/f=0 "Hello, this is a string; which has a semicolon."

The result was a textbox showing all of the text; it wasn't cut off at the ; character.

(I used Igor 6.22 on Windows XP.)

I suspect you have oversimplified your problem description.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
My strings are in a text wave, I tried doing what you did, simply excecuting the command and the anntotion was fine.

In my macro, I used the command, with the string explicitly written, and it worked.

If I use the string from the text wave, it cuts off. Now i'm more confused.
For instance, if we take

wave/t wave0
wave0[0] = "Hello, this is a string; which has a semicolon."

display
textbox/f=0 wave0[0]
textbox/f=0 "Hello, this is a string; which has a semicolon."


the two textboxes look different.
proland wrote:
the two textboxes look different.


I don't see this. Try this:
Function Test()
    Make/O/T/N=1 twave0
    wave/t twave0
    twave0[0] = "Hello, this is a string; which has a semicolon."
     
    Display
    TextBox /f=0 /X=5 /Y=5.00 "Hello, this is a string; which has a semicolon."
    TextBox /f=0 /X=5 /Y=25.00 twave0[0]
End


In IP 6.22A on Macintosh and Windows, the textboxes have the same text.

Possibly you are using StringFromList somewhere along the way and treating semicolon as a delimiter.
Ok... So it turns out the problem is with the Wordwraptextbox() function that I copied from these forums. I call this after creating the text box to account for very long sentences. If i comment this function call, it all works fine. Now I just have to figure out why this function is clipping the string at the first semicolon it encounters.
Alright, I've got it figured out now, AnnotationInfo returns a semi-colon separated list, so when I use stringbykey("text", strname, 1) i get the section of text which leads up to the semicolon.

So all i need to do is find the string position of "Text:" in the annotationinfo string and go from that position until the end of the string to get the full text.