1

Тема: как привязать кнопку к краю zedgraphcontrol?

Привет! Вопрос в названии темы.
Подробнее: чтобы кнопка оставалась, на том же месте относительно, например нижнего левого угла экземпляра ZedGraphControla.

2

Re: как привязать кнопку к краю zedgraphcontrol?

Ответ: я реализовал это так:

private void SetSize()
        {
            zedGraphControl1.Location = new Point(10, 10);
            // Leave a small margin around the outside of the control
            zedGraphControl1.Size = new Size(ClientRectangle.Width - 20,
                                    ClientRectangle.Height - 100);
            if (zedGraphControl1.Size.Width >= 800) zedGraphControl1.Size = new Size(800, ClientRectangle.Height - 100);
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            SetSize();
            button1.Location = new System.Drawing.Point(10, ClientRectangle.Height - 80);
            button2.Location = new System.Drawing.Point(130, ClientRectangle.Height - 80);
        }