Zohreh Tavakoli
Zohreh Tavakoli

Reputation: 93

Hide a property from object inspector in delphi

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

Upvotes: 5

Views: 2577

Answers (2)

RBA
RBA

Reputation: 12584

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: as good practice you should create another class, descendant of TCustomPanel and publish only the properties you need/want.

Upvotes: 10

kobik
kobik

Reputation: 21252

Use TCustomPanel as the base class and publish the properties you need.

Upvotes: 14

Related Questions