Page 1 of 1

parse file with ProgressBar

Posted: Fri Jun 16, 2006 8:57 am
by z3phir2003
hi

i need to parse a text file (csv) and for every line insert some content in sqlite database the parsing and inserting is not a problem.
my problem is i want to display a progres of the parsing using a ProgressBar
i don't know how many lines the file will have

i tried incrementing the position with 1 unit / line dosen't work the ProgressBar fill's up but the parsing is far from finised.

any ideea how to make this ?

Posted: Fri Jun 16, 2006 9:00 am
by Trond
Yes. Set the progress bar's maximum to Lof() before you start. After you've read a line, set the bar's value to Loc().

10x

Posted: Fri Jun 16, 2006 9:08 am
by z3phir2003
10x u'r a Lifesaver