我使用TreeView做帮助的索引,我在TreeView的每一个节点上都加了一个图标,但运行时,我发现图标和其后的节点文本相比都太大,如何才能将其变小?谢谢!

解决方案 »

  1.   

    在把图片加入到ImageList之前,现设置一下ImageList的图片大小属性ImageWidth ImageHeight
      

  2.   

    你可以通过控制ImageList 来控件图片的大小,,With Me
                .Icon = HelpWindowIcon.Picture
                With .ImageList_icon
                      .ImageHeight = 16
                      .ImageWidth = 16
                      With .ListImages
                            .Add , , Me.Icon
                      End With
                End With
           End With
    With Me.ImageList1
                 .ImageHeight = 20
                 .ImageWidth = 20
                 With .ListImages
                      .Add 1, , Me.Img_icon(1).Picture
                      .Add 2, , Me.Img_icon(2).Picture
                 End With
            End With
      

  3.   

    我使用TreeView做帮助的索引,我在TreeView的每一个节点上都加了一个图标,但运行时,我发现图标和其后的节点文本相比都太大,如何才能将其变小?谢谢
    ///設置與TreeView有關系的imagelist中圖片大小,是你自己設計的