Adding panel to base Form? Cannot see controls.

D

Doc John

I have a windows Form that inherits from Base_form. In Base_form I added a
panel that covers the whole Form (panel1.Dock = Fill). The problem is that
all the controls in the Form that inherit from Base_form are "under" this
panel, which means they're not visible..
Is it possible to make these controls visible again without having to make
major changes in the Form?

Thanks.

VS2005
 
P

Peter Duniho

[...] The problem is that
all the controls in the Form that inherit from Base_form are "under" this
panel, which means they're not visible..
Is it possible to make these controls visible again without having to
make
major changes in the Form?

There may be something you can do in the designer so that the control
starts out in the right place.

However, one thing you can definitely do is in your constructor, call
SendToBack() on the panel that's covering everything else up.

Pete
 
L

Linda Liu [MSFT]

Hi Doc,

It seems that you have set the Modifiers property of Panel in the Base_Form
to private.

When a control's Modifiers property is set to private on a base form, we
couldn't access the control in the inherited form. If you select the
control on the inherited form, you should see that all the properties of
the control are readonly in the Properties window.

In your scenario, when you're attempting to add a control onto the Panel in
the derived form, the designer would like to generate code to add the
control into the Panel. However, the problem is that the Panel could not be
accessed in the inherited form, so that the control can not be added to the
Panel at all.

To make the Panel available in the inherited form, change the Panel's
Modifiers property to protected or public and then build the project.
Reopen the Form that inherits from the Base_Form and you should be able to
add controls onto the Panel in the inherited form.

Hope this helps.
If you have any question, please feel free to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

Linda Liu [MSFT]

Hi Doc,

How about the problem now?

If the problem is still not solved, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

Sincerely,
Linda Liu
Microsoft Online Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top