473,498 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating an inherited control

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

Apr 20 '06 #1
1 1892
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
---------------

"ben m" wrote:
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

Apr 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
5389
by: Steve | last post by:
Can anyone point me to a primer for creating OCX controls in VB .net? In particular, I want to access a web service in a VB6 application (not an easy thing to do). So, if I can write an ActiveX...
1
7633
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
12
3137
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without...
3
5456
by: Wayne Brantley | last post by:
VS2005 RTM Create a web user control to use as a base class for other web user controls. Now, create a new web user control, change the class it inherits from to your base class and compile....
1
6254
by: Robert W. | last post by:
In my WinForms app I've long been able to create a linear gradient effect by just intercepting the PaintEventHandler event. But I'd now like to create an inherited user control, specifically of a...
0
1296
by: MikeY | last post by:
Hi everyone, I posted a question very early today, but maybe I wasn't articulate enough. Hopefully this will illicit a response I've created a windows form and a User Control. This is a...
4
16228
by: Mikus Sleiners | last post by:
I can't seem to add new controls to form that is inherited from another form. I have BaseForm wich have table layout on it 2 panelsm and some buttons. Now i create InheritedForm : BaseForm and...
4
1583
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, Is there ANY way to accomplish this: (see below)? Basically, I want to have a loop (a < 3 is just for testing purposes, it will be an underermined amount). In this loop, I want to be...
0
937
by: baburc | last post by:
Hai I have inherited one datagridview control as custom control and i have added one textbox control on it, when i write code in textbox's keypress or keydown event , this event doesn't raises...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.