public Carreteras() { InitializeComponent(); // cargar y agregar Datos = new PostgresDataAccess.DataAccess(); Pi = Datos.ObtenerPuntosInteresCarretera(); int i = 0; foreach (PostgresDataAccess.PuntoInteres p in Pi) { RadioButton r = new RadioButton(); r.Name = r.Text = p.RadioText; r.Location = new Point(6, 19 + r.Size.Height * i++); r.Size = new Size(160, 17); r.CheckedChanged += new EventHandler(radioButton_CheckedChanged); groupTipo.Controls.Add(r); groupZoom.Location = new Point(groupZoom.Location.X, groupZoom.Location.Y + r.Size.Height + 1); btnMostrar.Location = new Point(btnMostrar.Location.X, btnMostrar.Location.Y + r.Size.Height + 1); this.Height += 10; } }