Jelmer Posted March 10, 2006 Posted March 10, 2006 I've got a listbox. The listbox has a x count of items. If i press the button on one of it there is some code executed. But if number 2 is selected and i press the up or down keys. The other item is getting bleu.. but the code that should be executed doesnt. If i do the code (fill_customer();) on the onload part, it is executed, but for the old one, so it runs 1 event after. My code: private void lstKlant_KeyDown(object sender, KeyEventArgs e) { fill_customer(); } private void lstKlant_KeyPress(object sender, KeyPressEventArgs e) { fill_customer(); } Quote
Cags Posted March 10, 2006 Posted March 10, 2006 I'm slightly confused, it sounds like your trying to run code when a new item is selected, if this is the case you can use the OnSelectedIndexChanged method. If this isn't what your attempting todo, then I'm misunderstanding. Quote Anybody looking for a graduate programmer (Midlands, England)?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.