Giorgio Garabello wrote:I've just tried but seems dont work
MWINDOW #3,65537
Print #3, "hallo" dont print in the furst menu element but in the cirner of the MAW
Are you sure?
In my test I did the same, the string was nicely printed in each of the 4 menu items when hit:
:
rep loop
num= mcall (#c3%,0): awn= 65536
select on num
= -1 : stop : rem >>> esc
= -3 : mawdraw #c3%\1 : rem >>> wake, restores original aw$
=awn +1 : mwindow #c3%,awn +1: print #c3%;aw$(0,0)
=awn *2 +1 : mwindow #c3%,awn *2 +1: print #c3%;aw$(0,1)
=awn *3 +1 : mwindow #c3%,awn *3 +1: print #c3%;aw$(1,0)
=awn *4 +1 : mwindow #c3%,awn *4 +1: print #c3%;aw$(1,1)
end select
end rep
:
aw$ is the original array for MAWSETUP, containing a LF between two strings.
MAWDRAW and MAWITEM will only show the first part but PRINT will use the LF to move to the next line.
Remember that the y-size of each cell must be enough to hold the lines.
Also any justification used in MAWDRAW will have no effect after MWINDOW and may need to be fixed with AT or CURSOR commands.
You could use a loop to go through all visible aw$ items to check if any LF is there and then do a MWINDOW/PRINT to replace that cell. However depending on the number of visible cells this may be a slow process.
Beware that if the string before the LF is too long for the cell width, the rest will move one line down too.
Bob