Usuario
combobox last item selected

Pregunta
-
Hi to all the people.
Have a combobox and like that a action to be done only when i have selected a specific item on it and change to other. Its ot global.
I have thinked in something like that but dont work:
Private Sub cbaction_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbaction.SelectedValueChanged If cbaction.SelectedText.LastIndexOf("Wait") Then Ytextbox.Enabled = True Xtextbox.Text() = "X:Coordinate" Ytextbox.Text() = "Y:Coordinate" End If End Sub
Thanks to all of you. Im newly
Todas las respuestas
-
-
Hola lo siento solo me di cuenta despues....pido disculpas
la question es que tengo un combobox i quiero que se ejecute un action al cambiar uno solo de esos items pero uno especifico no todos. No es una accion global y eso me confunde. Lo que quiero es que cuando este item este seleccionado se desactive un textbox y cuando cambie a otro se vuelva a activar pero que esa accion no se ejecute cuando se cambian entre otros elementos.
habia pensado en algo asi pero nose como hacerlo.
Private Sub cbaction_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbaction.SelectedValueChanged If comboaction.SelectedText.LastIndexOf("Wait") Then Ytextbox.Enabled = True Xtextbox.Text() = "X:Coordinate" Ytextbox.Text() = "Y:Coordinate" End If End Sub
me cuesta un poco explicar lo que quiero ojala lo entendais.
Gracias
-
y si usas
Private Sub cbaction_SelectedChangeCommited(...) If comboaction.SelectedText = "Wait" Then Ytextbox.Enabled = True Xtextbox.Text = "X:Coordinate" Ytextbox.Text = "Y:Coordinate" Else Ytextbox.Enabled = False End If End Sub
cambia al evento que hago referenciasaludos
Leandro Tuttini
Blog
Buenos Aires
Argentina