Click here to Skip to main content
Licence 
First Posted 26 Nov 2004
Views 26,482
Bookmarked 8 times

ComboBox with proper SelectedIndexChanged support

By | 26 Nov 2004 | Article
Fixes a bug in the standard ComboBox wrt the SelectedIndexChanged event

Introduction

If you use a ComboBox and want to change various other controls whenever a new item is selected in the ComboBox, then one event that should help you is the SelectedIndexChanged event. However if you don't change the item by clicking with the mouse or using up or down arrows, this event doesn't fire. So, inspired by Furty (Divider Panel - A Tutorial on creating a custom Windows Forms control from Start to Toolbox), I've thrown together this replacement. It simply fires the SelectedIndexChanged event whenever the KeyUp event fires.

I know this is not a seminal piece of work, but it might help someone out.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Mark Farmiloe

Web Developer

United Kingdom United Kingdom

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 26 Nov 2004
Article Copyright 2004 by Mark Farmiloe
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid