I have a listview that uses a progress bar (pb1.png). There is a timer that refreshes the list (lvDisk) every 1 minute. After several minutes the list will not show the progress bars (pb2.png, but will show the .text
Me.lvDisk.Items.Clear()
For Each dRow In tmpDistinct
Dim itm As New ListViewItem
itm.Text = dRow
Dim pb As New Wisej.Web.ProgressBar
With pb
.Maximum = tmpUNCData.First.DriveSpace
.Value = tmpUNCData.First.UsedSpace
.Dock = DockStyle.Fill
.Text = drow.name
If percentUsed > 95 Then
.BarColor = Drawing.Color.Yellow
Else
.BarColor = Drawing.Color.Green
End If
End With
itm.Control() = pb
next
Me.lvDisk.Items.Add(itm)
The first image is what draws initially, the second is what shows after a while (again, sometimes it is several minutes, sometimes longer)
If I take out the line itm.Text = dRow, then it appears to always refresh with the progress bar
Hi Shawn,
WJ-8597 is fixed in dev build 1.4.53.
Best regards
Frank
Hi Shawn,
we fixed the problem with disposed controls bound to ListView items (logged as WJ-8597) and the fix will be included in the next Wisej build.
However in your scenario we recommend to precreate the items and progress bars and then just set the value instead of destroying and recreating everything on each tick.
We´ll inform you when the new release is online.
Best regards
Frank
Can you send a small test case? The code in the message seems to indicate that on every tick the controls are recreated but never disposed.
Please login first to submit.