I pass a DesktopListBox into the class so that I can loop through the records and print them using the graphics from ShowPrinterDialog.
The DesktopListBox can contain in the order of 10,000 rows.
Printing works fine when I print only one page of rows but with a large quantity of pages it does not obtain the row data correctly. In fact it does not obtain the data at all.
When looping through the DesktopListBox rows if I use myListBox.ScrollPosition = n (loop index) before obtaining the row data then the data is returned correctly even for 10,000 rows.
Can someone point me in the right direction please.
If Not Me.RowSelectedAt(row) Then
If Color.IsDarkMode Then
g.ClearRectangle(0.0, 0.0, g.Width, g.Height)
End If
If row Mod 2 = 1 Then
g.DrawingColor = ColorGroup.NamedColor(“secondaryContentBackgroundColor”)
g.FillRectangle(0.0, 0.0, g.Width, g.Height)
End If
Return True
End If