%REM textbox try. gr.open 255,180,180,180,0,0 gr.screen scrx,scry svx =1280 svy =800 sx  =scrx/svx sy  =scry/svy gr.scale sx,sy DIM tprt[30]   % potential nbr of lines in the box. gr.color 255,255,255,255,1 prx =100 pry =150 wrx =450 wry =250 gr.rect rptr, prx, pry, prx+wrx, pry+wry   % the box gr.set.stroke 3        % paint param. gr.text.size 35 gr.text.height th gr.color 255,255,0,0,1 gr.circle redp, prx+wrx, pry+wry, 8     % red point gr.text.draw sz, 3*prx, pry-2*th, "" gr.color 255,0,0,255,1 t$ ="Peter Piper picked a peck of purple peppersticks which he happened to find concealed in Mother Hubbards's closet." gosub TextBox    % print t$ into a textbox do   do     gr.touch touched,x,y     if !background() then gr.render   until touched   x/=sx   y/=sy   deltx =prx+wrx-x ! delty =pry+wry-y   do     gr.touch touched,tx,ty     tx/=sx     ty/=sy     if tx>(prx+300) & ty>(pry+th+10)    % rect size limits       gr.modify redp, "x", tx+deltx, "y", pry+wry   % ty+delty       gr.modify rptr, "right", tx+deltx, "bottom", pry+wry   % ty+delty       wrx =tx+deltx-prx      ! wry =ty+delty-pry       gosub TextBox     %  <--- dynamic changes       wry =li*(5+th)+10       gr.modify sz, "text", int$(wrx)+" x "+int$(wry)+"      "+int$(li)+" lines."       gr.render     endif   until !touched until quit END " Bye...!" TextBox:  % put t$ into rect at prx,pry with wrx,wry size. li =0 m  =0 do   r$ =""   do     m++     wr$ =word$(t$,m)     gr.text.width tw, r$+wr$     if twwrx-5 | wr$=""   m--   li++   if tprt[li]     gr.modify tprt[li], "text", r$     if tprt[li+1] then gr.modify tprt[li+1], "text", ""   else     gr.text.draw tprt[li], prx+5, pry+li*(th+5), r$   endif until wr$="" return