Form Inheritance

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Hello,

I created a base form with a few textbox and button controls on
it. I then created a child form from this base form using the Add
Item process in Visual Studio 2005.

Problem: All of my controls on the child form are locked and
I cannot seem to unlock them.

Anyone know how I can create a child form where the controls
are NOT locked or else unlock the controls after the child form has
been created?


J
 
What do you mean by "locked"? They are inherited, and their position, size
and so on are set in the base controls InitializeComponent() event, so you
can't modify them from the derived control. You would have problems if this
was allowed, since two controls could try to "reconfigure" the base's controls.
 
Joe said:
I created a base form with a few textbox and button controls on
it. I then created a child form from this base form using the Add
Item process in Visual Studio 2005.

Problem: All of my controls on the child form are locked and
I cannot seem to unlock them.


Take a look at the controls' '(Modifier)' properties in the properties
window. Depending on the modifier you select there for the controls in the
base class, they can be edited or not in the derived class.
 
Joe,

As you use verbs which has no meaning, you seldom get an answer here or it
should be your goal to get a long line of not understand answers and
replies.

Locked has not any meaning here it can be not enabled, not visible, read
only etc..

Cor
 
Joe,

As you use verbs which has no meaning, you seldom get an answer here or it
should be your goal to get a long line of not understand answers and
replies.

Locked has not any meaning here it can be not enabled, not visible, read
only etc..

Cor

Actually I think "locked" is not a bad word since when you click on
one of those items in the designer you see a little locked padlock on
the item.
 
Jack Jackson said:
Actually I think "locked" is not a bad word since when you click on
one of those items in the designer you see a little locked padlock on
the item.

Yeah. And Cor: those are technically adjectives. I guess you could argue
that "enabled" and "locked" are verb participles or something nerdy like
that, but you mentioned "visible" which is clearly an adjective. I understand
your basic point but you don't have to be a jerk about it.

Or does Microsoft formally require that now?
 
Hello Jack,
Actually I think "locked" is not a bad word since when you click on
one of those items in the designer you see a little locked padlock on
the item.

In addition (I think) Locked used to be a property (in VB6) where a control
would be disabled but not look like it was disabled. This would allow a textbox
to be uneditable but remain white unlike if it was disabled.
 
Back
Top