Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » PromptOK and \n
PromptOK and \n [message #48106] Thu, 18 May 2017 13:50 Go to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi there,
is there a way to use the carriage return in a PromptOK? Adding \n in the String does not generate an error, but it does not work.
Regards,
Gio
Re: PromptOK and \n [message #48107 is a reply to message #48106] Thu, 18 May 2017 13:58 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Quote:

Hi there,
is there a way to use the carriage return in a PromptOK? Adding \n in the String does not generate an error, but it does not work.
Regards,
Gio


Hello,

Yes, if you need to use a C string (which contains CR (\r), LF (\n), etc.) try using DeQtf() function: (http://www.ultimatepp.org/src$RichText$Utilities$en-us.html)
PromptOK(DeQtf(msg));



If you simply need to show some text and need a new paragraph in QTF format, you can use an ampersand "&" in your text message without using DeQtf(). See "Basic Qtf Codes" section: http://www.ultimatepp.org/srcdoc$RichText$QTF$en-us.html

Regards,

Oblivion


[Updated on: Thu, 18 May 2017 14:11]

Report message to a moderator

Re: PromptOK and \n [message #48110 is a reply to message #48107] Thu, 18 May 2017 16:54 Go to previous message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Thanks, that worked like a charm!
Previous Topic: install UPP on a new laptop with Win 10
Next Topic: Where did the console app go (i.e. select main package)....
Goto Forum:
  


Current Time: Thu Mar 28 17:36:24 CET 2024

Total time taken to generate the page: 0.01439 seconds