I'm trying to extend the collection "Buttons" of type "TcxEditButtons". The purpose is to add an "OnClick" event and a "Shortcut" property on all buttons of a legacy TcxButtonEdit component. I started by overwriting the "Properties" property with the code below:
type
TMycxDBButtonEditProperties = class(TcxCustomButtonEditProperties)
private
FButtons: TMycxEditButtons;
procedure SetButtons(const Value: TMycxEditButtons);
function GetButtons: TMycxEditButtons;
public
constructor Create(AOwner: TPersistent); override;
procedure AfterConstruction; override;
published
property Buttons: TMycxEditButtons read GetButtons write SetButtons;
end;
... in my component i do this ...
type
TMycxDBButtonEdit = class(TcxCustomButtonEdit)
FProperties: TMycxDBButtonEditProperties;
published
property Properties: TMycxDBButtonEditProperties read FProperties write SetProperties;
The problem is somewhat obvious: the collection is available for editing, but does not reflect the actual ancestral property "Buttons". The question is: How do I make my collection affect the buttons on the component?
I tried to understand and apply what is described in the links below the support of Dev Express, but without success (incompetence)
https://www.devexpress.com/Support/Center/Question/Details/Q136143/creating-custom-tcxbuttonedit