开发者

Using VS form designer to put controls in a container defined in a superclass?

I'm using Visual Studio 2010, and I have a base class Form, and several other forms subclassing it. I can create a co开发者_运维知识库ntainer, such as a Panel in the parent form. In the designers for the child forms though, I'm unable to create controls inside the container. I tried setting the container to protected, but it doesn't appear to make any difference.

Is there any way I can create a container (I really want a FlowLayoutPanel) in the base class in a way that will allow me to interact with it in the designers for the subclasses?


You should set the Modifiers flag of your panel to Protected. Please also refer to the Walkthrough: Demonstrating Visual Inheritance MSDN topic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜