I see I misread a little - you want to load a text file into your edit box:
startBlue BlueUserID$, BluePasswd$
` Build it up
Edit = createEdit(50, 50, 320, 320, 1, 0)
` Get the filename and store it in the edit box
Filename$ = openDialog("Open a file", "All Files|*")
setGadgetText Edit, ReadFile( Filename$ )
wait key
` Tear it down
Edit = deleteGadget(Edit)
end
function ReadFile(Filename$)
FileContent$ = ""
open to read 1, Filename$
` Read first line
read string 1, FileContent$
` If that wasn't the end of the file, continue
if file end(1) = 0
` Read a line
read string 1, NewLine$
` While last read wasn't end of file
while file end(1) = 0
` Add to the contents
FileContent$ = FileContent$ + chr$(13) + chr$(10) + NewLine$
` Read the next line
read string 1, NewLine$
endwhile
endif
close file 1
endfunction FileContent$