Listview Control Problem

Started by Petrus Vorster, December 08, 2012, 06:26:02 PM

Previous topic - Next topic

Petrus Vorster

I have created a confusing scenario in a listview control and i dont know where i have gone wrong.

I have 6 columns in a Listview: Company_name, Phone Nr, Fax Nr, Registration number, create date and Index.
The info is loaded from a file and must simply place this info in the same order as it finds it in the file.
For some reason all the entries in the first column is correct, but none of the others, they are all over the place or not there at all.
I looked at the example in the folder, but i cannot see where i went wrong.

I had a good example but cannot find it anywhere.  >:(

Thanks for the patience everyone, Im getting there!
-Regards
Peter

Jim Dunn

Check out the Firefly examples folder... "Sample Listview"...

'-----------------------------------------------------------------------------------------------------------------
'   ** Sample Code **
'-----------------------------------------------------------------------------------------------------------------
Sub AddListView()

    Local Nr     As Long
    Local RowNr  As Long

    FF_ListView_DeleteAllItems HWND_FORM1_LISTVIEW1

    gDatum = Mid$(Date$,4,3) + Mid$(Date$,1,3) + Mid$(Date$,9,2)

    ' Load sample data.
    For Nr = 5001 To 5100 Step 3
        FF_ListView_InsertItem HWND_FORM1_LISTVIEW1, RowNr, 0, gDatum
        FF_ListView_InsertItem HWND_FORM1_LISTVIEW1, RowNr, 2, Using$("####  Article ##",Nr, Nr - 5000)
        RowNr = RowNr + 1
    Next Nr

'    For RowNr = 0 To DataCount
'        FF_ListView_InsertItem HWND_FORM1_LISTVIEW1, RowNr, 1, Read$(RowNr+1)
'    Next
'
'    Data "12", "16", "1720", "28", "19", "110", "81", "21", "34", "37", "84", "73", "118", "44", "52", "77", "83"

End Sub
3.14159265358979323846264338327950
"Ok, yes... I like pie... um, I meant, pi."

Petrus Vorster

Thanks Jim!
Sometimes I can twist a simple thing to the point where I can no longer understand a thing I did!!!!
-Regards
Peter