Long strings in low level graphics - wordwrap

I need to print a very long string (a whole paragraph) on a low level graphics screen.

When I use gfxTextOut(string), I get one long line, past the end of the screen, but no word wrapping.

Is there a way to handle such long strings in low level graphics?

The string works OK in Interpreter window with printf(), but that is hard to use and takes screen real estate.
Ara

Of course. There are at least three different ways of plotting/drawing text on the chart:

  1. PlotText() and PlotTextSetFont()
    AFL Function Reference - PLOTTEXT
    AFL Function Reference - PLOTTEXTSETFONT

  2. GfxTextOut()
    AFL Function Reference - GFXTEXTOUT

  3. GfxDrawText()
    AFL Function Reference - GFXDRAWTEXT

If you want to print text in some cell / rectangle and be able to format it, align, break the text into lines - like in the example below, you should use GfxDrawText() which takes care of all of those things automatically:

4 Likes

Thanks ... it worked perfectly
Ara