从delphi中的对象检查器隐藏属性 [英] Hide a property from object inspector in delphi

查看:250
本文介绍了从delphi中的对象检查器隐藏属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个新的组件。
如何隐藏对象检查器中的 Caption 属性?
我使用 TPanel 作为祖先类。

I want to make a new component. How can I hide the Caption property in the object inspector? I use TPanel as ancestor class.

推荐答案

使用 UnlistPublishedProperty 。在此链接中 http://delphihaven.wordpress.com/ 2009/05/17 / tip-removal-a-property-at-design-time / 可以找到一个完全解释的例子。

by using UnlistPublishedProperty. At this link http://delphihaven.wordpress.com/2009/05/17/tip-removing-a-property-at-design-time/ you can find a fully explained example.

LE:作为一个好习惯,您应该创建另一个类,TCustomPanel的后代,并仅发布您需要/需要的属性。

LE: as good practice you should create another class, descendant of TCustomPanel and publish only the properties you need/want.

这篇关于从delphi中的对象检查器隐藏属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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