This code will do it in a few seconds if that's fast enough for you.
As for the original question, StringGadgets are better suited for smaller amounts of text, say 32k or maybe even 64k on systems with a lot of RAM. The memory management of those gadgets is treated differently acccording to Microsoft and they should not be used for large amounts of data. EditorGadgets should be used for larger texts. In many cases you will have to set their maximum size limits as described in the posts above.
Hope this helps.
Code: Select all
Enumeration
#Window_0
#Editor_0
EndEnumeration
Procedure GetText(File.s)
MyFile.l = ReadFile(#PB_Any, File)
a.l = 0
Repeat
MyData.s = ReadString()
AddGadgetItem(#Editor_0,a,MyData)
a + 1
Until Eof(MyFile)
CloseFile(MyFile)
EndProcedure
FileName.s = "C:\temp\115k.txt" ; <---Your File Name Here
If OpenWindow(#Window_0,10,10,640,480,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"EditorGadget") And CreateGadgetList(WindowID(0))
EditorGadget (#Editor_0,10,10,620,460,#PB_Container_Raised)
MyTime.l = GetTickCount_()
GetText(FileName)
MyTime = GetTickCount_() - MyTime
MessageRequester("Done.", "File Loaded in " + Str(MyTime / 1000) + " Seconds.")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf