private void AddCustomListBox() { this.SuspendLayout(); CustomProfileListBox customProfileListBox = new CustomProfileListBox(); customProfileListBox.AccessibleName = "NetworkListPanel_ProfileListBox_CustomListBox"; customProfileListBox.Size = new Size(this.Width - 2, this.Height - (this._listBoxHeader.Location.Y + this._listBoxHeader.Height) - 2); customProfileListBox.Location = new Point(1, this._listBoxHeader.Location.Y + this._listBoxHeader.Height + 1); customProfileListBox.BackColor = Color.WhiteSmoke; customProfileListBox.Visible = false; this.Controls.Add((Control) customProfileListBox); customProfileListBox.SendToBack(); customProfileListBox.Visible = true; this._customListBox = customProfileListBox; this.ResumeLayout(false); }
public void AdjustCustomListBoxSize(CustomProfileListBox newCustomListBox) { if (this._customListBox == null) return; this._customListBox.Size = new Size(this.Width - 2, this.Height - (this._listBoxHeader.Location.Y + this._listBoxHeader.Height) - 2); }