Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide a property from object inspector in delphi

Tags:

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.

like image 329
Zohreh Tavakoli Avatar asked Apr 23 '13 08:04

Zohreh Tavakoli


2 Answers

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

like image 200
kobik Avatar answered Oct 17 '22 11:10

kobik


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.

like image 44
RBA Avatar answered Oct 17 '22 12:10

RBA