Click here to Skip to main content
15,881,803 members
Articles / Desktop Programming / Windows Forms
Article

ComboBox with proper SelectedIndexChanged support

Rate me:
Please Sign up or sign in to vote.
2.33/5 (6 votes)
26 Nov 2004 34.1K   612   8  
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


Written By
Software Developer (Senior) Churchill Computer Solutions Ltd
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --