We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

CollectionBase question

Thread ID:

Created:

Platform:

Replies:

5504 Jul 6,2003 10:19 PM Windows Forms 0
loading
Tags: FAQ
Vikas Manghani
Asked On July 6, 2003 10:19 PM

Hi I have my Collection class inherited from CollectionBase. Now, by default the VS.Net IDE will provide a Collection Editor for any properties of type of my Collection. I am adding components of type MyComponent(inherited from Component) to the collection. I have overriden the Dispose method of Component in MyComponent class. When the user clicks the Remove button in the collectionEditor and then Ok, the Dispose method is called. Now i want that when a component is removed the user should be prompted for confirmation via a MessageBox.Show, and only if he clicks OK in the MessageBox should the component be removed. I know i can examine the DialogResult property of the MessageBox.Show() method, but what code should be written when Cancel is clicked so that the component remains in the collection. Thanks in advance Best Regards Vikas

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;