为一组控件启用设计模式 [英] Enabling Design mode for a array of control

查看:102
本文介绍了为一组控件启用设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,
我正在以编程方式添加5个面板来创建用户控件.但是,当我在此用户控件上添加控件时,并没有在这些面板中添加控件.我试图为那些面板启用设计模式.但是,由于它们是通过编程方式创建的,因此编译器会抛出错误,指出这5个面板不存在.如何为这些面板数组启用设计模式?

Hi experts,
I am creating a user control with 5 panels added programmatically. But when I add a control onto this user control it''s not getting added inside those panels. I tried to enable design mode for those panels. But since they are created programmatically the compiler throws an error saying those 5 panels do not exist. How can I enable the design mode for those array of panels?

推荐答案

您是否确实将控件添加到了Forms Controls集合或Panel中?没有看到您的代码,所有猜测都起作用了,但是我敢打赌您将它们添加到了表单中,而不是面板中.
Did you do add the control to the Forms Controls collection or the Panel? Without seeing your code its all guess work, but I''m betting you added them to the Form, not the Panel.


这篇关于为一组控件启用设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆