工具提示控件如何通过新属性增强表单上的所有控件? [英] How does the tooltip control enhance all controls on the form with a new property?

查看:65
本文介绍了工具提示控件如何通过新属性增强表单上的所有控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当回答另一个问题时,我开始想知道如何像ToolTip-control一样向表单的所有控件添加新属性。

When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.

例如,我可以只需将组件添加到表单,就可以使用它向所有文本框添加 IsDirty标志,它将为每个文本框进行处理。

For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.

添加工具提示时控件窗体上的所有控件都神奇地获得了一个新属性 tooltip on tooltip1,该属性可以通过编程方式或在设计视图中进行设置。

When adding the tooltip-control to the form all controls magically gets a new property "Tooltip on tooltip1" that can be set both programatically and in design view.

我希望能够做自己的增强器。

I want to be able to do my own enhancer like that.

推荐答案

这是扩展程序提供程序

这篇关于工具提示控件如何通过新属性增强表单上的所有控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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