繁体   English   中英

ListViewGroup 显示项目但不显示标题

[英]ListViewGroup shows items but not headers

我已经阅读了几个论坛并尝试了不同的选择。 大多数答案都是this ,这让我认为这就是问题所在。 我将Application.EnableVisualStyles()放在.Designer.vb文件中InitializeComponent()的开头,如下所示:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class MetadataCollectionGUI
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()>
    Private Sub InitializeComponent()
        Application.EnableVisualStyles() '     <--- See Here
        Me.ListViewMetaDataCollection = New System.Windows.Forms.ListView()
        Me.ColumnTags = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
        etc... etc...
    End Sub
    
    Etc...
    
End Class

我是否误解了如何执行该特定解决方案,或者问题是否有所不同?

我发现了问题所在。 转到项目属性并启用应用程序框架。 现在您可以启用 XP 视觉样式。

在此处输入图片说明


谢谢 Hursey 和 jmcilhinney,如果没有你们,我是不会想出来的!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM