|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Creating an inherited controlgetting 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 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 --------------- Show quoteHide quote "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 > >
Multi-line comments
Communication between forms Legacy Connection Object - I need a new one Form1 can't getfocus again... Execute something stored in a variable Editing Multiple DataGridViews security issues with an upgraded VB6 program textbox enter or GotFocus Are there any tools that can generate call graph for Visual Basic .NET source codes? IE Privacy - DNS Problem - ASP.NET |
|||||||||||||||||||||||