PRB: Incorrect CListCtrl Painting During Label Editing (149709)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 2.2
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
This article was previously published under Q149709 SYMPTOMS
A label-editing enabled List View control with callback items (the
application stores the text), may show selected items incorrectly
highlighted when labels are edited in place. When label editing changes the
length of the text, clearing the item selection and re-selecting it may
cause the highlighted bar to span the length of the original text.
CAUSE
The functionality to show the highlighted bar resides in the List View
control. In this case, the control does not calculate the new size of the
highlighted bar for the edited label.
RESOLUTION
At the end of label editing, call the CListCtrl::SetItem function to make
the control calculate the size of the just edited item. This function sets
some or all of a list view item's attributes.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbListView kbprb KbUIDesign KB149709 |
---|
|