Delete control from inherited form

  • Thread starter Thread starter Robert Scheer
  • Start date Start date
R

Robert Scheer

Hi.

I am playing a bit with visual inheritance in vb.net. I created a base
form with two buttons, one of them has its Modifiers property set to
public. When I derive a new form from my base form I can resize and
change the behaviour of my public button, but I can't delete it. When
using visual inheritance isn't it possible to remove controls?

Thanks,

Robert Scheer
 
Robert,
When using visual inheritance isn't it possible to remove controls?
No. The base form 'needs' it, if you were able to delete it, the base form
may no longer work correctly. Correct?

I would think if it did not need to be visible on the derived form, then you
would hide the control. The base form could still interact with it as
normal, but it would not be visible on the derived form. Of course this is
with the understanding the base form allows it to be hidden...

Hope this helps
Jay
 
Hello,

Robert Scheer said:
I am playing a bit with visual inheritance in vb.net. I created a base
form with two buttons, one of them has its Modifiers property set to
public. When I derive a new form from my base form I can resize and
change the behaviour of my public button, but I can't delete it. When
using visual inheritance isn't it possible to remove controls?

You cannot delete an inherited control in a derived form.

HTH,
Herfried K. Wagner
 
Back
Top