Forum > Beginners
TStringList Question
(1/1)
JLWest:
Is there a way to load a text file into a TStringList. I'm loading the file into a listbox now but would like it in a TStringList.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- Var Valid: Boolean; TList: TStringList; FileName: String; begin FileName:='S4H=.txt'; TList := TStringList.Create; Listbox1.Items.LoadFromFile(FileName);
lainz:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- TList := TStringList.Create;TList.LoadFromFile('file.txt');
JLWest:
Yea, Works Great
Thanks.
Navigation
[0] Message Index