HP Forums

Full Version: TEXTOUT_P: new line?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi,
is there a way to get a new line in a TEXTOUT_P command?
I will to avoid to write more TEXTOUT_P line, but concentrate them in one, like we can do with Print in Terminal:
Code:

PRINT("My text here and 

my other text after a new line and a return. 
I like this line on new line" + EVAL (athing) +" nice"
);

thanks!
(05-21-2015 04:28 PM)salvomic Wrote: [ -> ]hi,
is there a way to get a new line in a TEXTOUT_P command?

With TEXTOUT_P() you are using x,y pixels, so to get to a "new" line, just change the x and y values (plus/minus) depending on which way the new vertical, horizontal spacing the line needs to be. Experiment with your font selection as to how many pixels per character you would need. With 320x240 pixels you can pixon or pixoff anything anywhere within.
(05-21-2015 04:59 PM)DrD Wrote: [ -> ]
(05-21-2015 04:28 PM)salvomic Wrote: [ -> ]hi,
is there a way to get a new line in a TEXTOUT_P command?

With TEXTOUT_P() you are using x,y pixels, so to get to a "new" line, just change the x and y values (plus/minus) depending on which way the new vertical, horizontal spacing the line needs to be. Experiment with your font selection as to how many pixels per character you would need. With 320x240 pixels you can pixon or pixoff anything anywhere within.

ok, I'm trying!
I would like to rewrite the texts for Terminal in TEXTOUT_P but when the text is log it's a bit tricky to get the same neat output...
For example, after solve() results I get a list, and sometimes it's too long and go off at right side without scrolling...

I'm experimenting Smile
You *could* make a subroutine that passed in a text string, passes out the pixel coordinates... just food for thought there.
(05-21-2015 05:14 PM)DrD Wrote: [ -> ]You *could* make a subroutine that passed in a text string, passes out the pixel coordinates... just food for thought there.

good idea Smile
I'll try
If it's a list you want to see, you could consider using EDITLIST instead of TEXTOUT.
That gives a screen showing one or more lists, which you can scroll around before returning to the program by pressing OK. Not as convenient, but it saves writing code to split strings into several TEXTOUT's.
Hello,

TEXTOUT does not support multi line print.
If you wanted to do this, you would need to manually locate the carage return (using POS) and split your string in a list of strings that gets individually printed using TEXTOUT one above the other.

Sorry, even internally, this is how it's done.

Cyrille
Reference URL's