RAD Studio
ContentsIndex
PreviousUpNext
Registering the Property Editor

Once you create a property editor, you need to register it with Delphi. Registering a property editor associates a type of property with a specific property editor. You can register the editor with all properties of a given type or just with a particular property of a particular type of component. 

To register a property editor, call the RegisterPropertyEditor procedure. 

RegisterPropertyEditor takes four parameters:

  • A type-information pointer for the type of property to edit—this is always a call to the built-in function TypeInfo, such as TypeInfo(TMyComponent)__typeinfo(TMyComponent).
  • The type of the component to which this editor applies—if this parameter is nil, the editor applies to all properties of the given type.
  • The name of the property—this parameter only has meaning if the previous parameter specifies a particular type of component. In that case, you can specify the name of a particular property in that component type to which this editor applies.
  • The type of property editor to use for editing the specified property.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!