private void CreateLabelAndComboBox(string text) { ControlsFactory controlsFactory = new ControlsFactory(); int pointY = getLocationY(); Label label = controlsFactory.CreateLabelForFilter(pointY, text); CheckBoxComboBox combo = controlsFactory.CreateComboBoxForFilter(pointY, text); if (tryFillComboBox(text, combo)) { int width = getComboBoxWith(combo, label.Text); combo.Width = width + 50; label.Width = width; _mainForm.Controls.Add(combo); comboList.Add(combo); _mainForm.Controls.Add(label); labelList.Add(label); } }