cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting new line in messages

vinaym
1-Newbie

Inserting new line in messages

I am using ProUIMessageDialogDisplay() to display a long message.

I want to break the message in two lines using "\n", but new line is not
inserted.









Anybody has an idea on how to insert new line in messages.



Regards,



Vinay



4 REPLIES 4

Vinay,

I don't know if these will work but try \r\n or
. In reality this
is a Java dialog box and I know Java supports parsing HTML so the

might be the best bet.



Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078






jrowe
1-Newbie
(To:vinaym)

It's been a while since I have done it, but my recollection is using
sprintf to get the string formatted with the line breaks and then
passing the resulting string to the dialog box.



This was before ProUIMessageDialogDisplay(). I had created my own
utility function that did the same thing. I should have patented the
thing. PTC would be paying me royalties and I wouldn't have to work.



Jeff Rowe

Honeywell


vinaym
1-Newbie
(To:vinaym)

\r\n &
don't work.



Jeff's suggestion works.



Replaced "\n" in message file with "%0s" and passed "\n" as the extra
argument to ProUIMessageDialogDisplay().



There is an issue though. Dialog will only show 81 characters of the
message and trim the remaining message.



I guess inside ProUIMessageDialogDisplay(). It is copying the message to
some ProLine variable.



My problem of showing a long message still persists :-(.



Regards,



Vinay
bbailey
3-Visitor
(To:vinaym)

Hi,

Looks like you'll have to implement your own UI dialog that displays in
the format you desire.

Ben
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration