First of all, I have never written a property editor from scratch, but had some help with one in another question. Refer to the accepted answer there. This was in Delphi 7, and now I have started using XE2 and I have to make sure my property editor is compatible with both 7 and XE2.
It's essentially a collection editor, with the difference that each collection item has its own named component in the parent form. Is there anything new about the property editors in XE2 since 7, since it is a huge version jump?
I do NOT want to make a complete copy of my unit for different versions. I want to maintain all possible versions in one unit.
Edit
It appears that Delphi XE2 has the same property editors as Delphi 7, but the issue I was facing was that although I was including DesignIDE
in my package, it could not find anything, so I had to add the ToolsAPI
folder to my library path.
However, now I have a new issue after this.
[DCC Fatal Error] ToolsAPI.pas(18): F1026 File not found: 'DockForm.dcu'
I'm lost in the whole concept of BPL packages and requiring others, etc.
DesignIntf
,DesignEditors
,DesignMenus
,DesignWindows
, etc - were introduced in D6, so they were in use in D7. Making a design-time property/component editor in XE2 is the same as in D7. Make a designtime-only package, add theDesignIDE
package and your component's runtime package to its Requires list, code your editor class(es) as needed, and then register them viaRegisterPropertyEditor()
,RegisterComponentEditor()
, etc inside your designtime package's exportedRegister()
function. If you still have problems, show your code. – Radke