簡體   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