Board index » cppbuilder » Hiding a published property
JD
CBuilder Developer |
Hiding a published property2004-07-05 07:29:23 PM cppbuilder90 I have a component derived from TComponent and I want to hide the Name property from the Object Inspector. As I understand it, the correct approach is to assign the property a NULL PropertEditor but I'm getting errors. namespace Mycomponent { void __fastcall PACKAGE Register() { TComponentClass classes[1] = {__classid(TMyComponent)}; RegisterComponents("SomePallette", classes, 0); TPropInfo *PropInfo = ::GetPropInfo( __typeinfo(TMyComponent), "Name" ); RegisterPropertyEditor( *(PropInfo->PropType), __classid(TMyComponent), "Name", NULL ); } } The initial error was Call to undefined function 'RegisterPropertyEditor' so I added #include <DesignIntf.hpp>to the header and now I'm getting 2 other linker errors: [Linker Error] Unresolved external '__fastcall Designintf::RegisterPropertyEditor(Typinfo::TTypeInfo *, System::TMetaClass *, const System::AnsiString, System::TMetaClass *)' referenced from C:\...\xxx.OBJ [Linker Fatal Error] Fatal: Could not open c:\...\xxx.bpl (program still running?) I suspect that the second error is the result of the first because the path that it referenced is not where the package resides. Could some one please tell me what I'm doing wrong here? ~ JD |