IonicWind Software

IWBasic => GUI Central => Topic started by: billhsln on March 05, 2010, 12:17:48 AM

Title: ListView not giving results I want/expect
Post by: billhsln on March 05, 2010, 12:17:48 AM
I am working on a program to match 2 different sub directories and display them side by side.

My problem is, the first time it just loads file names.  When you press on the Browse button again, this time it loads the way I expect it to.  You will see the check box marked as checked, the file name, file date and file size.  The first time the check box is not checked and I only see the file name, no date or size.

I have tried a few different things, but I must be missing it.

Any help will be appreciated,
Thanks,
Bill
Title: Re: ListView not giving results I want/expect
Post by: GJ on March 05, 2010, 05:02:11 AM
Hi Bill,


Quick look , seems lvi++ is too early....




'------------------------>>> removed LVI++ here

' Load Fields with data
CONTROLCMD d1,lv,@LVINSERTITEM,lvi,filename
CONTROLCMD d1,lv,@LVSETTEXT,lvi,1,TimeStamp
CONTROLCMD d1,lv,@LVSETTEXT,lvi,2,FileSize$
' Set Flag on
SetCheckState(d1,lv,lvi,1)
' set column width to Automatic
CONTROLCMD d1,lv,@LVSETCOLWIDTH,0,-1
CONTROLCMD d1,lv,@LVSETCOLWIDTH,1,-1
CONTROLCMD d1,lv,@LVSETCOLWIDTH,2,-1

'--------------> put LVI++ here

lvi++



GJ
Title: Re: ListView not giving results I want/expect
Post by: billhsln on March 05, 2010, 06:08:57 AM
Thanks, GJ.   That pointed me in the right direction.  I changed the initialize of lvi to be lvi = -1, instead of lvi = 0.  That also fixed the problem and leaves me with lvi having the most current value in it.  The program looks right now.  Will continue on.

Thanks again,
Bill