Beispiel #1
0
        public void AddToolPanel(Panel p)
        {
            p.SetParent(this.contextPanel);
            p.ShouldPassInput = true;
            p.SetWidth(contextPanel.Width);

            if (this.contextPanel.Children.Count > 1)
            {
                p.Below(this.contextPanel.Children[this.contextPanel.Children.Count - 2], ElementSpacing );//Align ourselves below the last panel over
            }
        }
Beispiel #2
0
        public void AddPanel(Panel p)
        {
            p.SetParent(this.ScrollPanel);

            if (this.Panels.Count > 0 && this.Panels[this.Panels.Count - 1])
            {
                p.Below(this.Panels[this.Panels.Count - 1], 3);
            }

            Panels.Add(p);

            p.SetWidth(this.ScrollPanel.Width);
            p.SetAnchorStyle(Anchors.Left | Anchors.Top | Anchors.Right);

            this.ScrollPanel.SetHeight(p.Position.Y + p.Height);
        }