Petr Novotny
April 9th, 1998, 10:43 AM
Hi,
in adition to recent fix found here, I have found a few more bugs with row highlighting (and editable subitems) and I could fix only some of them.
1. (NOT FIXED) In HIGHLIGHT_ALLCOLUMNS mode, after manual adjusting the column widths, the contents of listview becomes messy. It seems the whole control should be invalidated in response to end-tracking notification.
2. In HIGHLIGHT_ROW mode, there is a bug when the row is longer than the width of the window; the focus rect gets drawn at the right-hand side and after manual tracking of column widths, the result is really messy. The fix is simple - in DrawItem() override, in the switch(m_Highlight) statement, correct the case 2 to read
GetClientRect(&rcWnd);
rcHighlight = rcBounds;
rcHighlight.left = rcLabel.left;
rcHighlight.right = max(rcWnd.right,rcBounds.right);
break;
(the fourth line is changed).
3. When starting editing, the row doesn't get repainted properly at all! The fix is simple as well - in your EditSubLabel function, add the line
RedrawItems(nItem,nItem);
just before return statement (after the edit control has been created).
Has anyone got a good fix for #1? Thanks
in adition to recent fix found here, I have found a few more bugs with row highlighting (and editable subitems) and I could fix only some of them.
1. (NOT FIXED) In HIGHLIGHT_ALLCOLUMNS mode, after manual adjusting the column widths, the contents of listview becomes messy. It seems the whole control should be invalidated in response to end-tracking notification.
2. In HIGHLIGHT_ROW mode, there is a bug when the row is longer than the width of the window; the focus rect gets drawn at the right-hand side and after manual tracking of column widths, the result is really messy. The fix is simple - in DrawItem() override, in the switch(m_Highlight) statement, correct the case 2 to read
GetClientRect(&rcWnd);
rcHighlight = rcBounds;
rcHighlight.left = rcLabel.left;
rcHighlight.right = max(rcWnd.right,rcBounds.right);
break;
(the fourth line is changed).
3. When starting editing, the row doesn't get repainted properly at all! The fix is simple as well - in your EditSubLabel function, add the line
RedrawItems(nItem,nItem);
just before return statement (after the edit control has been created).
Has anyone got a good fix for #1? Thanks