Forex_Strategy_Builder.Dialogs.Balance_Chart.OnResize C# (CSharp) Method

OnResize() protected method

Recalculates the sizes and positions of the controls after resizing.
protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void
        protected override void OnResize(EventArgs e)
        {
            int buttonHeight = (int)(Data.VerticalDLU * 15.5);
            int buttonWidth  = (int)(Data.HorizontalDLU * 60);
            int btnVertSpace = (int)(Data.VerticalDLU * 5.5);
            int btnHrzSpace  = (int)(Data.HorizontalDLU * 3);
            int space = btnHrzSpace;

            // Button Close
            btnClose.Size = new Size(buttonWidth, buttonHeight);
            btnClose.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);

            // Balance Chart
            balanceChart.Size     = new Size(ClientSize.Width - 2 * space, btnClose.Top - space - btnVertSpace);
            balanceChart.Location = new Point(space, space);

            // Label dynamic info.
            lblDynInfo.Width = btnClose.Left - 2 * space;
            lblDynInfo.Location = new Point(space, btnClose.Top + 6);
        }