示例#1
0
        public void Control_Columns(int columns = 2, enControl_InputWidth size = enControl_InputWidth.Normal)
        {
            if (size == enControl_InputWidth.Centre)
            {
                columns = 2;
            }

            if (columns == 1)
            {
                pnlLabel.Dock     = DockStyle.Fill;
                pnlButton.Visible = false;
                pnlText.Visible   = false;
            }
            if (columns == 2)
            {
                pnlLabel.Dock     = DockStyle.Left;
                pnlText.Visible   = true;
                pnlButton.Visible = false;
            }
            if (columns == 3)
            {
                pnlLabel.Dock     = DockStyle.Left;
                pnlText.Visible   = true;
                pnlButton.Visible = true;
            }

            if (size == enControl_InputWidth.Normal)
            {
                pnlText.Dock   = DockStyle.Fill;
                pnlLabel.Size  = new System.Drawing.Size(LabelWidth, 22);
                pnlButton.Size = new System.Drawing.Size(30, 22);
                pnlText.Size   = new System.Drawing.Size(412, 22);
            }
            if (size == enControl_InputWidth.Thirds)
            {
                pnlText.Dock   = DockStyle.Fill;
                pnlLabel.Size  = new System.Drawing.Size(_inputControl.Width / 3 - 2, 22);
                pnlButton.Size = new System.Drawing.Size(_inputControl.Width / 3 - 2, 22);
                //pnlText.Size = new System.Drawing.Size(Width / 3 - 2, 22);
            }
            if (size == enControl_InputWidth.Centre)
            {
                pnlLabel.Size = new System.Drawing.Size(_inputControl.Width / 2 - 2, 22);
                pnlText.Dock  = DockStyle.Fill;
            }
            Columns = columns;
        }
示例#2
0
 public void Control_Columns(enControl_InputWidth size)
 {
     Control_Columns(Columns, size);
 }