PRB: Cannot Assign Images to a ColumnHeader Control in a Windows Forms ListView Control in Visual C# .NET (314933)
The information in this article applies to:
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
This article was previously published under Q314933 For a Microsoft Visual Basic .NET version of this
article, see
316202. This article refers
to the following Microsoft .NET Framework Class Library namespaces:
- System.Windows.Forms
- System.Runtime.InteropServices
SYMPTOMS When you attempt to assign images to a ColumnHeader control in a Windows Forms ListView control, the operation is unsuccessful. CAUSE This behavior occurs because the .NET implementation of the
System.Windows.Forms.ColumnHeader class does not include the capability to assign an image to the ColumnHeader control. You can assign only text to a ColumnHeader control. RESOLUTION To work around this issue in a .NET Windows Forms
application, use Interop Services to send messages to the underlying Win32 ListView control to direct it to add the images to specific columns. For
further details, see the "More Information" section of this article.
Modification Type: | Major | Last Reviewed: | 3/24/2004 |
---|
Keywords: | kbdraw kbGDI kbprb kbWindowsForms KB314933 |
---|
|