I have a combobox in a custom control. How can I expose specific events from it such as SelectedIndexChanged or KeyPress, etc to anyone/thing implementing my custom control?
A very simple solution rather than having custom events, would be to expose the nested control as a property of the custom control. From there you could attach event handlers to it very easily. It is not always advisable to expose child controls, but depending on the control type and how you are using it, it may work.
//create an instance of my control
MyCustomControl controlInstance = new MyCustomControl();
//attach and event handler to the exposed subcontrol
controlInstance.SaveButton.Click += new EventHandler(SaveButton_Click);