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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Best Way to Subclass controls?

Thread ID:





2587 Feb 2,2003 10:54 PM UTC Feb 14,2003 01:43 PM UTC WinForms 1
Tags: FAQ
Asked On February 2, 2003 10:54 PM UTC

Is there a good faq on subclassing controls. I've subclassed several controls by this method: 1) Create new user control: e.g. MyGrid. 2) Change "Inherits UserCongtrol" to "Inherits DataGrid" 3) Add a regular control to form by toolbox drag and drop. 4) go into form and change class of control to my class name. This works great. But the control doesn't show up in the toolbar, and I have to always change a toolbox type to get one on the form at design time. (I can also just copy my control from a form and paste it onto a new one...). What's the right way to do this?

Ramesh Praveen [Syncfusion]
Replied On February 14, 2003 01:43 PM UTC

Jim, To make your control showup in the toolbox (isn't that your question?), you have to right click on the toolbox area, select Customize Toolbox and in the subsequent dialog, browse to your dll/exe. This will then import the available Controls/Components into the toolbox. I believe in Everett(1.1 framework), when there is a Control in your solution, it automatically appears in the toolbox (you just have to restart VS.Net after creating), I think. -Praveen


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon