PRB: Cannot Specify Icon or SmallIcon for ListView VisuallyLast reviewed: June 17, 1997Article ID: Q163414 |
5.00
WINDOWS
kbinterop kbole kbprb
The information in this article applies to:
SYMPTOMSA form containing the ListView control suddenly loses the images shown in the listview. This happens after the form has been modified and any property of the ListView has been changed.
CAUSERight-clicking on the ListView control in the Form Designer will reveal a context menu. The bottom bar of that menu opens the ListViewCtrl Properties dialog box that holds a pageframe with four pages. Page 2 has the caption "Image Lists." It holds two combo box controls labeled "Normal" and "Small" (without the quotes.) Comctl32.dll contains both the Imagelist control and the ListView control. With the version of Comctl32.dll that originally came with Visual FoxPro 5.0, the Imagelists to be used for normal and small icons with the ListView control could be selected from those combo boxes on the "Image List" page of the ListViewCtrl Properties dialog box. You could drop either combo box down and see all of the Imagelist controls on the current form. Typically, there would be two, but the application design might require even more. A ListView for each size icon can be associated with only one Imagelist and different Imagelists must be used for each size. Several Microsoft developer products released since Visual FoxPro version 5.0 install a revised Comctl32.dll. In the Form Designer of Visual FoxPro 5.0, the new version of ListView no longer lists in the ListViewCtrl properties dialog "Image Lists" page, the ImageLists that reside on the current form. For each size icon, it shows the expression [none]. Clicking the "Apply" button at the bottom of the page sets all of the properties to the settings shown, so the new ImageList properties are "none."
RESOLUTIONThe ImageLists must be specified in code. For example, if the form has an Imagelist for normal-sized icons in the OLE container control "OleControl1," and one for small icons in "OleControl2," then you need to add two commands similar to the following in the init event method for the OLE container control that holds the ListView:
This.object.icon = thisform.olecontrol1.object This.object.smallicon = thisform.olecontrol2.objectThe above is only a suggestion. The specifics of the application will determine where to make the modification and the appropriate syntax to use.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce ProblemIn Microsoft Visual FoxPro for Windows version 5.0:
|
KBCategory: kbinterop kbole kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |