示例#1
0
        void resizeControls()
        {
            int referenceWidth  = elementsContainer.Panel1.Width - 6;
            int referenceHeight = elementsContainer.Panel1.Height - 6;

            PagePanel.Width    = referenceWidth / 2 - 4;
            PagePanel.Height   = referenceHeight / 3;
            PagePanel.Location = new Point(4, 5);
            PagePanel.ResizeControls();

            ColumnPanel.Width    = referenceWidth / 2 - 4;
            ColumnPanel.Height   = referenceHeight / 3;
            ColumnPanel.Location = new Point(referenceWidth / 2 + 4, 5);
            ColumnPanel.ResizeControls();

            RowPanel.Width    = referenceWidth / 2 - 4;
            RowPanel.Height   = 2 * referenceHeight / 3 - 8;
            RowPanel.Location = new Point(4, referenceHeight / 3 + 8);
            RowPanel.ResizeControls();

            DataPanel.Width    = referenceWidth / 2 - 4;
            DataPanel.Height   = 2 * referenceHeight / 3 - 8;
            DataPanel.Location = new Point(referenceWidth / 2 + 4, referenceHeight / 3 + 8);
            DataPanel.ResizeControls();

            selectedElementsGroupBox.Refresh();
        }
示例#2
0
        public Button AddElement(ElementPanel panel, ReportElement element, bool selectButton)
        {
            Button button = new Button() { Text = element.DisplayNameEl };
            button.Tag = element;
            //Add tool tip
            var toolTip = new ToolTip();
            toolTip.SetToolTip(button, element.DisplayNameEl);

            button.MouseDown += new MouseEventHandler(btn_MouseDown);
            panel.Controls.Add(button);
            if (selectButton) btn_MouseDown(button, null);
            panel.ResizeControls();

            return button;
        }
示例#3
0
        public Button AddElement(ElementPanel panel, ReportElement element, bool selectButton)
        {
            Button button = new Button()
            {
                Text = element.DisplayNameEl
            };

            button.Tag = element;

            button.MouseDown += new MouseEventHandler(btn_MouseDown);
            panel.Controls.Add(button);
            if (selectButton)
            {
                btn_MouseDown(button, null);
            }
            panel.ResizeControls();
            return(button);
        }
示例#4
0
        public Button AddElement(ElementPanel panel, ReportElement element, bool selectButton)
        {
            Button button = new Button() { Text = element.DisplayNameEl };
            button.Tag = element;

            button.MouseDown += new MouseEventHandler(btn_MouseDown);
            panel.Controls.Add(button);
            if (selectButton) btn_MouseDown(button, null);
            panel.ResizeControls();
            return button;
        }