Visual CSharp .NET - listBox

 
Vista:

listBox

Publicado por luiss (19 intervenciones) el 23/05/2005 16:50:28
buenas tardes
tengo que hacer un programa pero usando listBox

y cuando seleccione al darle clik a una opcion del listBox se ponga visible visible los campos que requieran esa opcion

eso lo tendria que escribir dentro del listBox o en un boton aparte
ya en el listbox en item ya escribi
opcion1
opcion2
opcion 3

o tengo que hacerlo de otra forma?

listBox1.Items.Add("opcion1")
listBox1.Items.Add("opcion2")
listBox1.Items.Add("opcion3")
se le agradece cualquier informacion
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:listBox

Publicado por OMAR CORTES (5 intervenciones) el 23/05/2005 17:09:52
private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
//this.Text = listBox1.Text;
switch (listBox1.SelectedIndex)
{
case 0: this.Text = listBox1.Text;
break;
case 1: this.Text = listBox1.Text;
break;
case 2: this.Text = listBox1.Text;
break;
case 3: this.Text = listBox1.Text;
break;
}
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar