Mega Code Archive

 
Categories / Delphi / Examples
 

How to write a property editor

Title: How to write a property editor Question: Which are the basic steps for writing property editors ? Answer: Writing a property editor requires five steps: 1. Deriving a property-editor object 2. Editing the property as text 3. Editing the property as a whole 4. Specifying editor attributes 5. Registering the property editor Delphi supplies a rich hierarchy of property-editor objects to choose from as your starting point. Here's the basic hierarchy; TPropertyEditor TOrdinalProperty TIntegerProperty TColorProperty TModalResultProperty TTabOrderProperty TCharProperty TEnumProperty TSetProperty TShortCutProperty TFloatProperty TStringProperty TComponentNameProperty TFontNameProperty TCaptionProperty TSetElementProperty TClassProperty TFontProperty TMethodProperty TComponentProperty Note that a specific property in Delphi does not know anything about which property editor is used to edit it. In fact, it is really the object inspector that chooses which property editor to use. If you do not like the property editor for a specific property you can use the Tools API to completely replace it with something else. Check out the site http://www.sddug.slctnet.com/pres_b.htm for the whole article.