Creating an inherited control

B

ben m

Hi all - we've recently switched up to 2005, and I'm having trouble
getting the hang of some things, among them, creating a control for the
project. Currently, we use a combination of controls on a TabControl -
mainly a grid on one tab, and a checkboxlist on the other, that
coordinate back and forth, so (un)checking a box will hide or show a
column on the grid. In addition, I would like the flexibility of adding
a DataSource at design time to the grid, and being able to edit the
columns displayed and maintained by the grid.

Initially, I simply copied the current setup to a control, which worked
well enough for appearance. However, I couldn't figure out how to
properly expose properties such as the Columns so that editing them
from my form would cause the changes to persist. They always
disappeared after rebuilding.

That led me to attempt to make a control that would provide the
majority of this, and simply allow a user to drop a grid onto a blank
tabpage. However, this is where I'm getting stuck, as I'm not sure how
to make a user control that will allow me to place another control on
it. I thought that creating an inherited control from TabControl would
allow me to do this, but I am unable to do so, as when I go to create
an Inherited Control in development, I am not allowed to use anything
other than UserControl (and the other controls I've made in this
project) as a base control.

Thanks in advance for any help you can offer.

- b
 
G

Guest

Hi,

If you want to create an inherited tab control I would add a new
class to the project and have it inherit tabcontrol.

Ken
 

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