Customizing Items methods in a ComboBox user control

G

Guest

I want to create a customized ComboBox where the methods ComboBox.Items.Add
and ComboBox.Items.Insert will behave thusly:
-- If the item is not present, add it.
-- If the item is present, set the selected index to the item (without
adding a duplicate).

I know the basics of inheriting from user controls, so if this was merely
overriding a method of ComboBox I could do it. I also know how to do this
with a couple lines of code in my main application. What I do not know, and
would like to, is how to put a new user control wrapper around an existing
ComboBox, overriding methods of its Items collection? I reviewed the MSDN
documentation to no avail.

[I was instructed to repost this question because my original post on
2007.03.26 did not have a "no spam alias" attached.]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top