Is there a way to view the controls on an inherited form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Warpig
    New Member
    • Sep 2010
    • 3

    Is there a way to view the controls on an inherited form

    Is there a setting in Vis.Studio, that enables you to see the controls that come with the Base form on your inherited form in the IDE. So lets say I have some Buttons and a Panel that I want on the base form and all inherited forms, but inside the Panel I want to changed the controls on the inherited forms so the buttons would exist on the base form (as would an empty panel) and I would then change the contents of the panel on the inherited form using the IDE. Currently when I look at an inherited form in my IDE It is blank, no buttons or anything. Is there a way to do this (non-programatically ) or am I just Dreaming?
  • Christian Binder
    Recognized Expert New Member
    • Jan 2008
    • 218

    #2
    I tried it and it works correctly!
    First I created two Forms in VS, named the first "BaseForm", the second "SubForm".

    Then I put two Buttons and a Label on the BaseForm.
    After that I opened the code-editor for SubForm.cs and modified the code from
    Code:
    public partial class SubForm { ...
    to
    Code:
    public partial class SubForm : BaseForm { ...
    to set the SubForm inherited from BaseForm.

    Then compile, maybe close the designer windows/tabs and reopen them and I see the controls of BaseForm in designer mode of SubForm with an inheritance-indicator-symbol in the upper left of each inherited control.

    Comment

    Working...