Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/07/2007, 08:13
RDV1981
 
Fecha de Ingreso: junio-2007
Mensajes: 47
Antigüedad: 17 años, 8 meses
Puntos: 0
como DESHABILITAR un textBox

Buenas...

Tengo nuevamente 2 dudas las cuales son las siguientes:

1) En un comboBox tengo una lista de opciones... necesito que al seleccionar una sola en especial me habilite un texBox.

La opción que me debe habilitar el textbox es nua denominada " OTRO ". (Esta opcíon " OTRO" está en el comboBox)

ESTE ES EL METODO DEL comboBox:

private void comboBox5_SelectedIndexChanged (object sender, System.EventArgs e)
{

}


ESTE ES EL METODO DEL textBox QUE SE DEBE DE HABILITAR:

private void textBox4_TextChanged(object sender, System.EvenArgs e)
{

}


2) A traves de un checkBox yo habilito y deshabilito 4 textBox, ahora el problema está en que los textBox cuando están deshabilitados permanecen totalmente visibles, lo unico es que no puedo escribir sobre ellos, ahora mi pregunta es: ¿COMO HAGO PARA OCULTARLOS, O COLOCARLOS DE ALGUNA MANERA SOMBREADOS COMO APARECEN EN MUCHAS APICACIONES DE WINDOWS? aquí les coloco el metodo del checkBox donde me habilita y deshabilita los textBox:

private void checkBox1_CheckedChanged(object sender, System.EventArgs e)
{
if (checbox1.Checked ==true)
{
textBox5.Enabled = true;
textBox6.Enabled = true;
textBox7.Enabled = true;
textBox8.Enabled = true;
}

else
{
textBox5.Enabled = false;
textBox6.Enabled = false;
textBox7.Enabled = false;
textBox8.Enabled = false;
}
}


MUCHISIMAS GRACIAS AL QUE ME PUEDA AYUDAR