473,756 Members | 7,293 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 1906
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
5418
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 control that accomplishes this in .Net, then I SHOULD be able to add the OCX component to my VB6 app and use it. Unless someone knows why this wouldn't work.... Any and all help is appreciated.
1
7652
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 it the TabPage created in step 1. I don't want to draw the TabPage on the Tabcontrol in design mode, but to have a few TabPage controls that I candynamicaly load to the TabControl at runtime. Thanks
12
3174
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 restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
3
5481
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. (You must have a <% Register %> so it will see it) You will get TWO warnings per class like:
1
6296
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 panel. I thought I was on the right track and did achieve the effect ... until I started putting some controls on the panel. Then I got an "Invalid parameter" error but don't understand what it's referring to. Based on examples I've found,...
0
1315
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 keyboard. What I have done is that every keystroke is entered into a textbox within my User Control. Want I want to do is to take that user input from keyboard textbox and display it within my main form. I also want to be able to close this control and...
4
16263
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 want to add some new controls and add them to pannels but i can't drag and drop them ... designer does not allow me. Why is that ? Panels and table layout modifiers is set to public.
4
1594
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 able to create a new cell each time. In this cell, I want the variable name to change. Is this at ALL possible? I've never been able to figure this out in some of the other languages. Any help would GREATLY be appreciated.
0
949
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 when i press enter key, but other keys works, please tell me a solution. Thanks
0
9303
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9117
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7078
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4955
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3651
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2508
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.