什么是事件可视化继承的办案标准的做法? [英] What is the standard approach for event handling in case of Visual Inheritance?

查看:165
本文介绍了什么是事件可视化继承的办案标准的做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道,当一个形式是在视觉上继承下来的,它的所有控件都锁定在设计时间。这个问题需要我们把事件处理程序的基本形式。现在我该怎么办,如果我想要将基本控制事件处理的派生形式?

We know that when a Form is visually inherited, all of its controls are locked in design time. This problem requires that we place event handlers in the base form. Now what should I do if I want to place base-control event handlers in the derived Form?

由于控件被锁定,双击上的控制方式来补充事件处理程序不应该工作。

Since the controls are locked, approach of double clicking on the control to add an event-handler should not work.

什么是事件可视化继承的情况下处理行业标准的方法?

What is the industry-standard approach for event handling in case of Visual Inheritance?

推荐答案

设计师的荣誉对基类成员的访问修饰符。为保护您必须基本形式的控制的修饰语财产私有改变。重新编译。现在继承的形式访问控制,你就能毫不费力地覆盖性能和分配从设计师的事件处理程序。

The designer honors the access modifiers on the base class members. You must change the Modifiers property of the base form's control from Private to Protected. Recompile. Now the inherited form has access to the control, you'll have no trouble overriding properties and assigning an event handler from the designer.

这篇关于什么是事件可视化继承的办案标准的做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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