This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
A winforms ListView control with custom drawing enabled does not fire OnDrawSubItem for subitems which it incorrectly believes are off screen because it is ignoring the column DisplayIndex in GetSubItemRect as called from ListView.CustomDraw.
Additionally, the DrawListViewSubItemEventArgs.Bounds rect in the event is incorrect for columns which have been reordered (at least for column 0. I'm not sure about other columns)
Repro:
Create a ListView with owner drawn set true in Details view
Set the DisplayIndex for column 0 to 3.
Horizontally scroll the list view such that column zero would be off the screen if the DisplayIndex were 0.
Note that the OnDrawSubItem is not fired for column 0, even though it is visible.
Original Comments
Feedback Bot on 8/25/2022, 09:57 AM:
(private comment, text removed)
Amy Li [MSFT] on 8/25/2022, 04:36 PM:
(private comment, text removed)
Tom Mason on 8/25/2022, 04:50 PM:
(private comment, text removed)
Tom Mason on 8/25/2022, 05:42 PM:
(private comment, text removed)
Amy Li [MSFT] on 8/26/2022, 05:47 PM:
(private comment, text removed)
Tom Mason on 8/26/2022, 07:41 PM:
(private comment, text removed)
Tom Mason on 8/26/2022, 07:42 PM:
(private comment, text removed)
Original Solutions
(no solutions)
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
A winforms ListView control with custom drawing enabled does not fire OnDrawSubItem for subitems which it incorrectly believes are off screen because it is ignoring the column DisplayIndex in GetSubItemRect as called from ListView.CustomDraw.
Additionally, the DrawListViewSubItemEventArgs.Bounds rect in the event is incorrect for columns which have been reordered (at least for column 0. I'm not sure about other columns)
Repro:
Create a ListView with owner drawn set true in Details view
Set the DisplayIndex for column 0 to 3.
Horizontally scroll the list view such that column zero would be off the screen if the DisplayIndex were 0.
Note that the OnDrawSubItem is not fired for column 0, even though it is visible.
Original Comments
Feedback Bot on 8/25/2022, 09:57 AM:
(private comment, text removed)
Amy Li [MSFT] on 8/25/2022, 04:36 PM:
(private comment, text removed)
Tom Mason on 8/25/2022, 04:50 PM:
(private comment, text removed)
Tom Mason on 8/25/2022, 05:42 PM:
(private comment, text removed)
Amy Li [MSFT] on 8/26/2022, 05:47 PM:
(private comment, text removed)
Tom Mason on 8/26/2022, 07:41 PM:
(private comment, text removed)
Tom Mason on 8/26/2022, 07:42 PM:
(private comment, text removed)
Original Solutions
(no solutions)