Is it possible to load a carraige return in a textarea? After using the File Requester, I mean. For example, here is my code:
<code>
Select WaitEvent()
Case $1001 ;menu event
Select EventData()
Case 5:
filename$=RequestFile$("Open File","txt,htm,html,doc,pdf,dat",False)
If filename<>0 Then
filein=ReadFile(filename$)
SetTextAreaText textarea1,""
While Not Eof(filein)
theline$=ReadLine$(filein)
AddTextAreaText textarea1,theline$
Wend
CloseFile(filein)
EndIf
</code>
There's more than just that, but that's the important stuff. It opens the file just fine, but it all runs together, without putting the lines from the text file into their own lines in the textarea.
Here's something else I tried, but it wouldn't work AT ALL:
<code>
Select WaitEvent()
Case $1001 ;menu event
Select EventData()
Case 5:
filename$=RequestFile$("Open File","txt,htm,html,doc,pdf,dat",False)
If filename<>0 Then
filein=ReadFile(filename$)
SetTextAreaText textarea1,""
While Not Eof(filein)
a=a+1
theline$=ReadLine$(filein)
SetTextAreaText textarea1,theline$,a,1,2
Wend
CloseFile(filein)
EndIf
</code>
Any help?
also---i was guessing on how to set aside the code, by using "< code>" and "< /code>" ...so if this doesn't show up right can someone please tell me how to do this properly? thanks.
<code>
Select WaitEvent()
Case $1001 ;menu event
Select EventData()
Case 5:
filename$=RequestFile$("Open File","txt,htm,html,doc,pdf,dat",False)
If filename<>0 Then
filein=ReadFile(filename$)
SetTextAreaText textarea1,""
While Not Eof(filein)
theline$=ReadLine$(filein)
AddTextAreaText textarea1,theline$
Wend
CloseFile(filein)
EndIf
</code>
There's more than just that, but that's the important stuff. It opens the file just fine, but it all runs together, without putting the lines from the text file into their own lines in the textarea.
Here's something else I tried, but it wouldn't work AT ALL:
<code>
Select WaitEvent()
Case $1001 ;menu event
Select EventData()
Case 5:
filename$=RequestFile$("Open File","txt,htm,html,doc,pdf,dat",False)
If filename<>0 Then
filein=ReadFile(filename$)
SetTextAreaText textarea1,""
While Not Eof(filein)
a=a+1
theline$=ReadLine$(filein)
SetTextAreaText textarea1,theline$,a,1,2
Wend
CloseFile(filein)
EndIf
</code>
Any help?
also---i was guessing on how to set aside the code, by using "< code>" and "< /code>" ...so if this doesn't show up right can someone please tell me how to do this properly? thanks.