用户控制和表单控制 [英] user control and form control

查看:67
本文介绍了用户控制和表单控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表单有用户控件和表单控件。

只有用户控件验证在第一次开始时触发。

请建议如何触发所有控件在第一个去。

My form has both user-control and form-control.
Only user control validations fire in the 1st go.
Please suggest how can I fire all the controls in the 1st go.

推荐答案

您需要将您的用户控件添加到主窗体的显示表面(或已存在的另一个容器)





MainScreen home = new MainScreen();

home.Show();

EntrySuggestion t_ES = new EntrySuggestion();

home.Controls.Add(t_ES);
You need to add your user control to the display surface of the main form (or another container already present)


MainScreen home = new MainScreen();
home.Show();
EntrySuggestion t_ES = new EntrySuggestion();
home.Controls.Add(t_ES);


这篇关于用户控制和表单控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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