testtext$="This is just a test to test the meaining of TextAreaLen" win=CreateWindow("test",20,40,800,600,Desktop(),7) panel=CreatePanel(0,0,800,600,win,0) txt=CreateTextArea(10,10,200,200,panel,1) canvas=CreateCanvas(220,10,200,200,panel) SetBuffer CanvasBuffer(canvas) ClsColor 255,255,255 Cls Color 0,0,0 SetTextAreaText txt,testtext$ LockTextArea txt lines1=TextAreaLen(txt,1) lines2=TextAreaLen(txt,2) Notify "TextAreaLen(txt,1): "+lines1+" TextAreaLen(txt,2): "+lines2 While WaitEvent()<>$803 Wend
this gives me
TextAreaLen(txt,1): 55 TextAreaLen(txt,2): 45
Actually I was wrong. It does'nt count words - it counts characters except "space". Thats still not lines though, in my oppinion.
Lazze