Inheritance: LayoutFarm.UI.UIBox
Ejemplo n.º 1
0
 public void AddItem(TreeNode treeNode)
 {
     treeNode.SetLocation(0, latestItemY);
     latestItemY += treeNode.Height;
     treeNode.SetOwnerTreeView(this);
     panel.AddChild(treeNode);
 }
Ejemplo n.º 2
0
        public void AddChildNode(TreeNode treeNode)
        {
            if (childNodes == null)
            {
                childNodes = new List<TreeNode>();
            }
            this.childNodes.Add(treeNode);
            treeNode.parentNode = this;
            //---------------------------
            //add treenode presentaion
            if (this.isOpen)
            {
                if (this.primElement != null)
                {
                    //add child presentation 
                    //below here
                    //create layers                    

                    //add to layer

                    var tnRenderElement = treeNode.GetPrimaryRenderElement(primElement.Root);
                    tnRenderElement.SetLocation(indentWidth, newChildNodeY);
                    primElement.AddChild(tnRenderElement);
                    newChildNodeY += tnRenderElement.Height;
                    //-----------------
                }
            }
            //---------------------------
        }