I am writing a custom component editor, essentially similar to the TActionList editor, which allows you to create subcomponents. The editor has buttons for adding / removing components.
Now I would like to know if the selected component is inherited so that I can disable the delete button. I did not find such a member in IDesigner or its related interfaces.
If I just go ahead and delete using Designer.DeleteSelection(True); , then I get an exception:
The selection contains the xxx component entered in the ancestor and cannot be removed.
This is not so bad, but I would prefer to disable the delete button first.
source share