D
David
We've been using the WinForm ListView control on various forms in a large
..NET 1.1 app for two+ years without major problems.
We migrated the app to .NET 3.0 recently, and it appears that since then the
ListView control doesn't get redrawn/repainted correctly ON SOME SYSTEMS (on
other supposedly identical XP Pro SP2 dev systems, it never fails).
On those systems where it fails, the font that we specify for the
ListViewSubItem is initially ignored (ie, the default font/color is used),
but then displays properly (with the specified font/color) once the ListView
is hidden and then made visible again.
In fact, ONLY the portion of the control that was hidden by another form
gets redrawn correctly, leaving the part that wasn't hidden still displayed
as the wrong font... if the dividing line between hidden/not-hidden is
mid-way through an item in the ListView control, then part of the item
changes font and the other doesn't !!!
Here's a code fragment showing how we set the SubItem font in one of the
forms:
Dim displaySubItem As ListViewItem.ListViewSubItem =
lineItem.SubItems(Me.uiDisplayCol.Index)
If Not displaySubItem Is Nothing Then
With displaySubItem
.Text = Space(3) & Trim(.Text)
.ForeColor = LineStations_AllRequest_Color
.Font = New Font(.Font, FontStyle.Bold)
.... etc
Regardless of where we use the ListView (and regardless of who implemented
the control and the code that populates it), it now seems to have the same
problems, at least on those systems where it fails.
Any help would be appreciated.
DT
..NET 1.1 app for two+ years without major problems.
We migrated the app to .NET 3.0 recently, and it appears that since then the
ListView control doesn't get redrawn/repainted correctly ON SOME SYSTEMS (on
other supposedly identical XP Pro SP2 dev systems, it never fails).
On those systems where it fails, the font that we specify for the
ListViewSubItem is initially ignored (ie, the default font/color is used),
but then displays properly (with the specified font/color) once the ListView
is hidden and then made visible again.
In fact, ONLY the portion of the control that was hidden by another form
gets redrawn correctly, leaving the part that wasn't hidden still displayed
as the wrong font... if the dividing line between hidden/not-hidden is
mid-way through an item in the ListView control, then part of the item
changes font and the other doesn't !!!
Here's a code fragment showing how we set the SubItem font in one of the
forms:
Dim displaySubItem As ListViewItem.ListViewSubItem =
lineItem.SubItems(Me.uiDisplayCol.Index)
If Not displaySubItem Is Nothing Then
With displaySubItem
.Text = Space(3) & Trim(.Text)
.ForeColor = LineStations_AllRequest_Color
.Font = New Font(.Font, FontStyle.Bold)
.... etc
Regardless of where we use the ListView (and regardless of who implemented
the control and the code that populates it), it now seems to have the same
problems, at least on those systems where it fails.
Any help would be appreciated.
DT