/// <summary> /// Initializes a new instance of the CTreeView<T> class. /// </summary> public CTreeView() : base() { suspendUpdateCount = 0; //InitializeComponent(); //SuspendRecalculating = true; //DuringUpdating = true; //SuspendUpdate = true; BeginUpdate(); Nodes = new CTreeNodeCollection <T>(this); PathSeparator = @"\"; //DragAndDrop = new DragAndDropView(); AutoScroll = true; AllowDrop = true;//? //DrawStyle = CTreeViewDrawStyle.Tree; ShowPlusMinus = true; ShowLines = true; //ShowControls = CTreeViewShowControls.Automatically; ShowRootLines = true; _selectedNodes = new List <CTreeNode>(); RelocateCollapsing = true; SelectionMode = CTreeViewSelectionMode.Multi; DragAndDropMode = CTreeViewDragAndDropMode.ReplaceReorder; //DragAndDropFlag = false; IndentDepth = 30; IndentWidth = 10; selectionPen = new Pen(Color.Black, 1.0F); selectionPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; selectionBrush = new SolidBrush(SystemColors.Highlight); _LinesPen = new Pen(Color.Black, 1.0F); _LinesPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot; Bitmap imagePlus = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("CTreeView.Resources.plus.bmp")); Bitmap imageMinus = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("CTreeView.Resources.minus.bmp")); PlusMinus = new CTreeViewPlusMinus(imagePlus, imageMinus); dragDestination = new DragDestination(this); this.DoubleBuffered = true; //this.ResizeRedraw = true; //this.AutoScrollMinSize = new Size(0, 0); //DuringUpdating = false; //SuspendRecalculating = false; //SuspendUpdate = false; EndUpdate(); }
public CTreeNode() { m_nodes = new CTreeNodeCollection(this); }
public CTree() { m_nodes = new CTreeNodeCollection(null); }