How does the tooltip control enhance all controls on the form with a new property?

荒凉一梦 提交于 2020-01-13 05:56:08

问题


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.

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.

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.


回答1:


It's an Extender Provider.



来源:https://stackoverflow.com/questions/338924/how-does-the-tooltip-control-enhance-all-controls-on-the-form-with-a-new-propert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!