public void SetFocus(TGPAControl control)
        {
            for (int i = 0; i < this.controls.Length; i++)
            {
                for (int j = 0; j < this.controls[i].Length; j++)
                {
                    if (this.controls[i][j] == control)
                    {
                        this.focus = control;
                        control.Focus = true;
                        this.CurrentLine = i;
                        this.CurrentColumn = j;
                        return;
                    }
                }
            }

            throw new ArgumentException("Control " + control + " not in the section");
        }
        public OptionSection(String localizedName, int y, int lines, int columns)
        {
            this.LocalizedName = localizedName;
            this.SectionName = LocalizedStrings.GetString(this.LocalizedName);
            this.Y = y;
            this.Lines = lines;
            this.Columns = columns;

            this.controls = new TGPAControl[lines][];

            for (int i = 0; i < this.controls.Length; i++)
            {
                this.controls[i] = new TGPAControl[columns];

                for (int j = 0; j < this.controls[i].Length; j++)
                {
                    this.controls[i][j] = null;
                }
            }

            this.focus = null;
        }
 public void AddControl(int line, int column, TGPAControl control)
 {
     this.controls[line][column] = control;
 }