Hi,
I use ListView TwoLinesAndBitmap.
My application crashes during load of listview.
Using a small database of 3 records, all works fine.
Loading a database of about 2000 records and so 2000 images it crashed.
Just using listview without images it works fine.
Is there a limit of bitmaps loaded in listview or is there a limit of bitmap size used with listview?
Part of Source:
Sub FetchTitelLijst
Dim i As Int
Dim Cursor1 As Cursor
Dim txt, str1 As String
ListView1.Clear
txt = "SELECT Titel, Image, Aanschaf, Soort, Status, ROWID FROM " & DBTableName & " WHERE Titel LIKE '%" & Zoeksleutel.Text & "%' OR EAN LIKE '%" & Zoeksleutel.Text & "%' ORDER BY SorteerTitel"
Cursor1 = SQL1.ExecQuery(txt)
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Dim sil As SixLines
sil.First = Cursor1.GetString("Titel")
str1 = Cursor1.GetString("Aanschaf")
sil.Third = Cursor1.GetString("Soort")
sil.Four = Cursor1.GetString("Image")
sil.Fith = Cursor1.GetString("Status")
sil.Six = Cursor1.GetString("ROWID")
sil.Second = sil.Third & " / " & sil.Fith & " / " & str1.SubString2(8,10) & "-" & str1.SubString2(5,7) & "-" & str1.SubString2(0,4)
If File.Exists(ImagePath, sil.Four & "f.jpg") = True Then
ListView1.AddTwoLinesAndBitmap2(sil.First, sil.Second, LoadBitmap(ImagePath, sil.Four & "f.jpg"), sil)
Else
ListView1.AddTwoLines2(sil.First, sil.Second, sil)
End If
Next
Cursor1.Close
ListView1.RequestFocus
End Sub
Thanks,
André
I use ListView TwoLinesAndBitmap.
My application crashes during load of listview.
Using a small database of 3 records, all works fine.
Loading a database of about 2000 records and so 2000 images it crashed.
Just using listview without images it works fine.
Is there a limit of bitmaps loaded in listview or is there a limit of bitmap size used with listview?
Part of Source:
Sub FetchTitelLijst
Dim i As Int
Dim Cursor1 As Cursor
Dim txt, str1 As String
ListView1.Clear
txt = "SELECT Titel, Image, Aanschaf, Soort, Status, ROWID FROM " & DBTableName & " WHERE Titel LIKE '%" & Zoeksleutel.Text & "%' OR EAN LIKE '%" & Zoeksleutel.Text & "%' ORDER BY SorteerTitel"
Cursor1 = SQL1.ExecQuery(txt)
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
Dim sil As SixLines
sil.First = Cursor1.GetString("Titel")
str1 = Cursor1.GetString("Aanschaf")
sil.Third = Cursor1.GetString("Soort")
sil.Four = Cursor1.GetString("Image")
sil.Fith = Cursor1.GetString("Status")
sil.Six = Cursor1.GetString("ROWID")
sil.Second = sil.Third & " / " & sil.Fith & " / " & str1.SubString2(8,10) & "-" & str1.SubString2(5,7) & "-" & str1.SubString2(0,4)
If File.Exists(ImagePath, sil.Four & "f.jpg") = True Then
ListView1.AddTwoLinesAndBitmap2(sil.First, sil.Second, LoadBitmap(ImagePath, sil.Four & "f.jpg"), sil)
Else
ListView1.AddTwoLines2(sil.First, sil.Second, sil)
End If
Next
Cursor1.Close
ListView1.RequestFocus
End Sub
Thanks,
André