The information in this article applies to:
SYMPTOMSA 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. CAUSEThe 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. RESOLUTIONAt 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. STATUSThis behavior is by design. MORE INFORMATIONThis problem can be seen in the MSDN sample, MFCLIST. The sample demonstrates a simple list view control implemented with MFC. Editing any of the "Address" column labels and changing the text length demonstrates the problem. Sample CodeThe following code demonstrates how to correct the behavior:
Additional query words: 2.10 2.20 3.10 3.20 4.00 4.10 LPSTR_TEXTCALLBACK edit highlight MFCList
Keywords : kbMFC KbUIDesign kbVC |
Last Reviewed: August 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |