0

XE3 Prof, Win64.

I created a new Button component, based on TButton.

It have a special menu in IDE, named "Set Button Style".

procedure Register;
begin
    RegisterComponents('SComps', [TSAButton]);
    RegisterComponentEditor(TSAButton, TSAButtonEditor);
end;

procedure TSAButtonEditor.ExecuteVerb(Index: Integer);
begin
    Set_Style(TSAButton(Component));
end;

function TSAButtonEditor.GetVerb(Index: Integer): string;
begin
    Result := 'Set Button Style';
end;

function TSAButtonEditor.GetVerbCount: Integer;
begin
    Result := 1;
end;

The button's have special click in IDE - the double click on the component generates OnClick in my code.

After I installed my editor menu, this capability lost, because IDE calls my function, and not the original (the default code generating).

How can I restore this capability in my button with preserving my menu too?

Thanks for every info!

dd

4

1 に答える 1