新建一个类DropDownTreeNode
using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Runtime.Serialization; namespace AddComboBoxNode { public class DropDownTreeNode : TreeNode { private ComboBox comboBox = new ComboBox(); #region 构造函数 public DropDownTreeNode() : base() { } public DropDownTreeNode(string Text) : base(Text) { } protected DropDownTreeNode(SerializationInfo serializationInfo, StreamingContext context) : base(serializationInfo, context) { } public DropDownTreeNode(string text, TreeNode[] children) : base(text, children) { } public DropDownTreeNode(string text, int imageIndex, int selectedImageIndex) : base(text, imageIndex, selectedImageIndex) { } public DropDownTreeNode(string text, int imageIndex, int selectedImageIndex, TreeNode[] children) : base(text, imageIndex, selectedImageIndex) { } #endregion public ComboBox ComboBox { get { this.comboBox.DropDownStyle = ComboBoxStyle.DropDownList; return this