By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

listbox_selectedIndexChanged event

P: n/a
when does the listbox_selectedIndexChanged event fire? I can only get
something to happen when I clear the listbox. I want to get the value of the
item currently selected in the listbox but the dotnet version of listbox
does not seem to work like the old version of it.

Kilo Bravo
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Kilo Bravo" <kb@spoof.com> schrieb:
when does the listbox_selectedIndexChanged event fire? I can only get
something to happen when I clear the listbox. I want to get the value of
the item currently selected in the listbox


\\\
Private Sub ListBox1_SelectedIndexChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles ListBox1.SelectedIndexChanged
Me.Label1.Text = DirectCast(Me.ListBox1.SelectedItem, String)
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
Kilo,

In addition to the other posters.

Be aware that the selected index of this control change whenever you change
that. So when you are initializing the control or if you change the index
inside this event.

I hope this helps,

Cor
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.