Search code examples
componentsc++buildervcl

How do I hide an inherited __published property in the derived class in a VCL component?


I have created a new VCL component based on an existing VCL component. What I want to do now is set the Password and Username properties from an ini file instead of the property inspector.

Robert Dunn Link

I read on the delphi forum above you cannot unpublish a property and that the only workaround is to redeclare the property as read-only. I tried this but it all it does is make the property read only and grayed out in the object inspector. While this could work I would prefer if the property wasn't visible at all.

__property System::UnicodeString Password = {read=FPassword};

Thanks in advance for any help or links to c++ VCL component writing tutorials. I am using CB2010


Solution

  • Look up DesignIntf.UnlistPublishedProperty. See this tread.