Topic: How toshow a blank textrow on screen

Jeff,
My problem is a matter using outtext of AppGraphics:
Normally a blank row with text is not really useful to show on screen , but in my edit sheet I want to insert blank text rows. The purpose is that users can fill it with  own data.
If  I define that row as:
row(cel%r+scroll)(4:maxcol)= '                                                     '
or
! do i = 4, maxcol; row(cel%r+scroll)(i:i) = char(32); end do
Outtext will show nothing; I did solve is preliminary using dots in a not so smart way as follows:
row(cel%r+scroll)(4:maxcol)= ' .                                                                   .'
Write(row(cel%r+scroll)(:3),'(I3)') cel%r+scroll !... the inserted row

The next rows on screen have to be moved by one position down:
do i=cel%r,maxrow              ! Re-writing changed rows
    CALL settextxy(1,charh*(i-1)) !put row in textwindow starting at column 1
    call Outtext(row(i+scroll)(:maxcol))
end do

Is there an other way to avoid that dots?

I am working to make my edit sheet more "monkey proof" prior to publish it  on my site.
This is only one point which I want to correct.

Regards, Klaus

Re: How toshow a blank textrow on screen

Jeff, there is an additional problem I have with OUTTEXT in my edit sheet by scrolling text up and down:
Previous text of a row has to be overwritten by new text of the row moved up or down.
This is no problem by formatted numerical data when it is written to a text row for edditing.
But if the end the row keeps input-text with different length, OUTTEXT stops with the last printable character and ignores blanks.
In this case the sheet gets unusable after scrolling the text.
What can I do to solve this problem???
Regards, Klaus

Re: How toshow a blank textrow on screen

Klaus,

A string of spaces or trailing spaces will not be printed by AppGraphics because of how strings are converted from Fortran to C.  Because Fortran doesn't have a true "end of string" character like C (the NULL character), spaces are regularly used as empty slots in a Fortran string.  When preparing the string for C, the Fortran string is basically converted using the expression:

TRIM(FSTRING)//C_NULL_CHAR

The result is that trailing spaces are removed.  If the string is only spaces, it is completely empty once it gets to the AppGraphics drawing routines.

To get around this procedure, you could do a few things:

1. Add a single character at the end of your string (like a pipe "|" character)

2. Draw an filled box over the old text manually

We could add an optional flag to the outtext calls, something like NOTRIM, in the next version (probably available next week) that would allow printing spaces.  Perhaps that would be the ideal fix?

Jeff Armstrong
Approximatrix, LLC

Re: How toshow a blank textrow on screen

Jeff,
I suppose the NOTRIM flag will be an optional parameter to Outtext ? That should be fine. An additional character at the end I used already : a dot. A filled box is only a solution if rows in my edit sheet has to be overwritten.
regards, Klaus