HP Forums

Full Version: SZ_Show_Text - graphics alternative to terminal screen
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is interactive graphics alternative to HP Prime terminal screen in order to show any text content on multiple pages from a program, with line breaking capability, coloring and different font sizes support.

Usage:

- Cursors to change pages
- Functional on screen menu
Esc : Exit from the view

Calling convention:

SZ_Show_Text(text, font, color_fg, color_bg)

- The text contains array of strings/lines.
- The size of the individual string can be much larger than screen width, in which case is wrapped automatically
- If the line contain only '.NP' it would force next page break. The font is HP Prime font value (0-7)

Example:

SZ_Show_Text({"Content1...", "Content2..."}, 2, #FF0000h, #000000h)};

Any comment, suggestion and bug report is appreciated.

EDIT 2018-10-23: New version v1.1. I have reported that latest Virtual Calculator (non-beta) require suffix 'h' for base defined numbers during call from Home/CAS and inside code, in order to avoid syntax error. Thanks.
I can't understand this app.

Maybe you, the author, can clarify the circumstances where the command can be used.

I cannot use this

SZ_Show_Text({"Hello World"}, 4, #00FF00h, #000000h);

I get:

Error: Invalid Input.


Then I adapt the DEMO program:

Code:

export SZ_Show_Text_DEMO()
begin
  local i,t;
  
i:=4;
t := {

     "SZ_Show_Text by Sasa, 2018-10-17",
     "",
     "Interactive graphics alternative to" +
     " HP Prime terminal screen" +
     " in order to show any text" +
     " content on multiple pages from a" +
     " program, with line breaking capability,"+
     " coloring and different font sizes"+
     " support.",
     ""
  };

  SZ_Show_Text(t, i, #00FF00h, #000000h);
end;
#cas

and it did not work.
Changing the value of variable i to 6, or in alternative changing the text length and only then it works.

Apparently one must seek a way to have long enough text to extend beyond one page, at a given font size for the command to work.

This way it severely caps the function usefullness.
Reference URL's