private void AddGroup(object sender, EventArgs e) { var newGroup = new Visgroup { ID = GetNewID(), Colour = Colour.GetRandomLightColour(), Name = "New Group", Visible = true }; _visgroups.Add(newGroup); UpdateVisgroups(); VisgroupPanel.SetSelectedVisgroup(newGroup.ID); GroupName.SelectAll(); GroupName.Focus(); }