各位大大好:
我想问一下TreeView的一个节点其文字可以设定太长时自动换行,或是一个节点的文字是两行吗?
在网络上有看到很多VS2005的功能...
可是我用的是VS2003,想请问在VS2003 WinForm要怎么做??

解决方案 »

  1.   

    帮你顶,VS2003太老了,现在别人都用VS2010了
      

  2.   

    利用treeView1_DrawNode自己画.
     private void treeView1_DrawNode(object sender, DrawTreeNodeEventArgs e)
            {
                e.Graphics.DrawString(e.Node.Text, this.Font, new SolidBrush(this.ForeColor), new PointF(e.Bounds.Location.X + 0.2f, e.Bounds.Location.Y + 0.2f));
                e.Graphics.DrawString(e.Node.Text, this.Font, new SolidBrush(this.ForeColor), new PointF(e.Bounds.Location.X + 0.2f, e.Bounds.Location.Y +this.treeView1.ItemHeight/2+ 0.2f));        }
      

  3.   

    我的TreeView中没有看到DrawNode的事件耶!是要新增什么NameSpace吗?
      

  4.   

    没有耶!!我去MSDN看过了,它是VS2005之后才有的…