473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Q: Inheriting forms

Hi!

I have created a form called "TheBase" on that form i have a ListControl.
The listcontrol is set to Protected.

Now i have created a new form called InheritedForm like this

public class InheritedForm : TheBase
{
....
}

All the components and so on are inherited from TheBase, but what i want to
do is to
add extra columns to the ListControl, but this property is readonly. Is
there any way to go round this?

I want all the methods and so on from TheBase but want to add extra
functionallity to InheritedForm and the ListControl.

Regards

Martin Arvidsson
Nov 17 '05 #1
1 1023
Hello,

You can add your columns from your InheritedForm using
listView1.Columns.Add( "MyColumn", 200, HorizontalAlignment.Left );
--
With best regards,
Andrew

http://www.codeproject.com/script/pr...asp?id=1181072
"Visual Systems AB (Martin Arvidsson)" <ma**************@vsab.net> wrote in
message news:OQ**************@TK2MSFTNGP11.phx.gbl...
Hi!

I have created a form called "TheBase" on that form i have a ListControl.
The listcontrol is set to Protected.

Now i have created a new form called InheritedForm like this

public class InheritedForm : TheBase
{
...
}

All the components and so on are inherited from TheBase, but what i want to do is to
add extra columns to the ListControl, but this property is readonly. Is
there any way to go round this?

I want all the methods and so on from TheBase but want to add extra
functionallity to InheritedForm and the ListControl.

Regards

Martin Arvidsson

Nov 17 '05 #2

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

Similar topics

1
by: Yasutaka Ito | last post by:
Hi, I have a base form (FormBase), which defines things like the value of the WindowState. Other forms inherit from this base form to reflect the layout given in the base form. Is there a way...
3
by: thechaosengine | last post by:
Hi all, I wanted to put some common security functions into a class that inherits from the Page class and then use the new class as the basis for all my pages. Unfortunately, if I try and...
1
by: Rasmus Kromann-Larsen | last post by:
Hey, I'm working on an application (questionaire) with alot of different question types (very different form layout)... But the questions share attributes, however - since I'm working in the...
2
by: Charles Law | last post by:
I want a set of controls that all have a border, like a group box. I thought I would create a base control containing just a group box from which my set of controls could inherit. Assuming that...
5
by: Ed Willis | last post by:
What is the best way to make a window read only for an inherited window. How do I access the all the controls such as textboxes etc. to make everything read only? I have an update window that I am...
4
by: Xero | last post by:
Hello. I am using vb.net. There are two forms in my project. One is 'base' and the other one is 'savecurrent'. There is a value stored in a textbox called 'qc_a' in 'base'. I want to inherit...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
7
by: Vish | last post by:
Hi, I have a base form from which i want all of my forms to inherit from. The base form has three buttons anchored to the bottom right of the base form. When i first inherit a new form from the...
5
by: UJ | last post by:
I have a user control that inherits from the standard windows text box. I have a routine that adds stuff to it. I have compiled it into a dll. I have added it to my app and I can debug into it. I...
1
by: BillE | last post by:
Can I inherit from a web form? I would like to reuse procedures in a web form base class code behind by inheriting from it. For example, I would like to have a HandleError function defined in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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...

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.