By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,759 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,759 IT Pros & Developers. It's quick & easy.

Adding panel to base Form? Cannot see controls.

P: n/a
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
Jul 11 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 11 Jul 2007 14:33:04 -0700, Doc John <no <"email>"wrote:
[...] 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
Jul 11 '07 #2

P: n/a
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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

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

Jul 12 '07 #3

P: n/a
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

Jul 16 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.