XE3 Prof,Win64。Delphi,按鈕編輯器,在IDE中保留默認點擊
我基於TButton創建了一個新的Button組件。
它在IDE中有一個特殊的菜單,名爲「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;
該按鈕在IDE中有特殊的點擊 - 雙擊該組件會在我的代碼中生成OnClick。
當我安裝了我的編輯器菜單後,此功能丟失了,因爲IDE調用了我的功能,而不是原來的(默認代碼生成)。
如何在保存菜單的同時在我的按鈕中恢復此功能?
感謝您的每一個信息!
dd
特定的Delphi版本應該在你的標籤中。由於你已經有5個標籤,你必須刪除最不相關的添加'delphi-xe3' –
我不明白這意味着什麼:*在我安裝了我的編輯器菜單後,此功能丟失,因爲IDE調用我的功能,而不是原來的。* –
當您點擊普通按鈕時,IDE會生成「onclick」到dfm/pas。在我安裝我的編輯器之後,IDE調用我的「設置按鈕樣式」功能。因此,「onclick」會爲我產生損失。 – durumdara