May 06, 2024, 07:53:34 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


ListView not giving results I want/expect

Started by billhsln, March 05, 2010, 12:17:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

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
When all else fails, get a bigger hammer.

GJ

March 05, 2010, 05:02:11 AM #1 Last Edit: March 05, 2010, 05:13:25 AM by GJ
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

billhsln

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
When all else fails, get a bigger hammer.