Overriding a Combobox

A

Alex Glass

I have overriden the combobox class in my application. Is there a way I can
write code that triggers when the Combobox.Items collection is changed (I.E.
myCombo.Items.Add or myCombo.Items.Remove) ?? I have tried using breakpoints
with AddItemsCore and AddItemCore override functions but could not determine
what triggers these functions.


Thanks,
Alex
 
L

Lee Gillie

Alex said:
I have overriden the combobox class in my application. Is there a way I can
write code that triggers when the Combobox.Items collection is changed (I.E.
myCombo.Items.Add or myCombo.Items.Remove) ?? I have tried using breakpoints
with AddItemsCore and AddItemCore override functions but could not determine
what triggers these functions.


Thanks,
Alex

I'm at home now, and all my code is at work, but I recall you need to
bind the combobox NOT to a dataset, but rather an IList / IEditable. I
recall MS has examples on how to do this with a datagrid, but those on-
overrides for change events should work the same way.

HTH - Lee
 

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