foufa's solution works:
I wanted a multi line text input where a user can write his todo-log or change-log inside a blitz 3d program.
The first thing that you must be sure of is that you set GUI_TextBox value [WRAP] to 0.
ex:UserTodoChangelog_TextBox=GUI_TextBox(UserTodoChangelogWindow,8,28,470,350,0,1,"",0) ;cursor line feed works only if wrap is set to 0
Then i have a function in my program like:
Function save_user_todo(display_txt$)
fileout = WriteFile("mydata.dat")
row$=""
For i = 1 To Len(display_txt$)
char$=Mid$(display_txt$,i,1)
If char$=Chr$(13) Or char$=Chr$(10)
WriteLine fileout,row$
row$=""
char$=""
End If
row$=row$+char$
Next
CloseFile( fileout )
End Function
I call this function when i want to save the text to file.
ex:save_user_todo(GUI_GadText$(UserTodoChangelog_TextBox))
For reading the text from file i use this:
If EV_MENU_SELECT(itm_Project_Todo)
FIL=ReadFile("mydata.dat");read in the users project todo file here
End if
display_file$="";empty the string
If FIL
While Not Eof(FIL) display_file$=display_file$+ReadLine$(FIL)+Chr$(13)
Wend
CloseFile FIL
EndIf
GUI_SETTEXT(UserTodoChangelog_TextBox,display_file$)
GUI_SetActive(UserTodoChangelog_TextBox,1);0 makes it to a no input gadget
1 makes it to a input gadget
GUI_OPENWIN(UserTodoChangelogWindow)
This works perfectly for me! Any questions?