PDA

View Full Version : Table & Listbox



Dado-Online
02-09-2005, 03:17 PM
First sorry for bad english!!
I have one problem!
I need to read text file to table and every line itself put in ListBox Object "List"!
But this is not a problem the problem is that text file that i use to read to table "table"
have very much lines and is not always same number of lines!! so i will need some code!!
some kind of do while actions or something similar to this but to do exactly what will do this lines
down!!!

Thanks Everyone!!!





r1 = Table.Concat(table, "", 1, 1);
r2 = Table.Concat(table, "", 2, 2);
r3 = Table.Concat(table, "", 3, 3);
r4 = Table.Concat(table, "", 4, 4);
r5 = Table.Concat(table, "", 5, 5);
r6 = Table.Concat(table, "", 6, 6);
r7 = Table.Concat(table, "", 7, 7);
.
.
.



l1 = ListBox.AddItem("List", r1, "");
l2 = ListBox.AddItem("List", r2, "");
l3 = ListBox.AddItem("List", r3, "");
l4 = ListBox.AddItem("List", r4, "");
l5 = ListBox.AddItem("List", r5, "");
l6 = ListBox.AddItem("List", r6, "");
l7 = ListBox.AddItem("List", r7, "");
.
.
.
--here should go very much this lines etc l8 = ListBox.AddItem("List", r7, ""); ...

Stefan_M
02-10-2005, 01:44 PM
Try something like this:

--read textfile into a table
text_table = TextFile.ReadToTable(_SourceFolder .. "\\Information.txt");

--special for loop to use with tables
for x,actline in text_table do
item_index = ListBox.AddItem("List", actline);
end


for more informations search help "Using For to Enumerate Tables"


Stefan_M

Dado-Online
02-12-2005, 01:26 PM
Thanks for help but i don't know how i didn't know that