Re: Form inheritence

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Alan T wrote:
Hi,

Yes now I can create a inherited form.
However, it seems does not allow me to move the controls in my inherited
form.
I got a groupbox and would like to add another text box inside this groupbox
but it does allow me to.

You need to change the Protection setting of the controls on the base
form from Private (the default) to at least Protected so that they are
changeable by inheriting forms.

.



Relevant Pages

  • Re: Basic Web Design Question
    ... 2005 or continue with inheriting a base class... ... Create a base class that all your pages inherit from, ... Use user controls, or custom server controls. ... A basic question though - is there a way of having 'common' elements on ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Use the Designer of a Windows Control for a Component
    ... All .NET controls under Windows.Forms assembly derive from Component. ... If you want your custom controls to be inheriting ... > Some thing like the Shape Designer sample found at. ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Re: Cant add controls on inherited form
    ... and everything works a treat in the inheriting form. ... happen at build time and I can add controls in the designer. ... was hasty in my response (mind you, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Inheriting from UserControls
    ... designer will be a problem. ... I want to be able to lay out my inheriting ... >>I want a set of controls that all have a border, ... If I change the modifier to Protected, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Form inheritence
    ... I just what would happen if I have up to hundred controls in my ancestor ... I got a groupbox and would like to add another text box inside this ... You need to change the Protection setting of the controls on the base ... changeable by inheriting forms. ...
    (microsoft.public.dotnet.languages.csharp)