{******************************************************************************* 文字列リソースコンポーネントプロパティエディタ TStrResPropEditor 備考: 設計時にTStringResourceをダブルクリックしたら Linesプロパティが呼ばれるだけの仕組みを実現 *******************************************************************************} unit StringResPropEdit; interface uses SysUtils, DesignIntf, DesignEditors; type {↓StrResoruce用のプロパティエディタ ダブルクリックでLinesを呼び出すだけ} TStrResPropEditor = class(TDefaultEditor) public procedure EditProperty(const Prop: IProperty; var Continue: Boolean); override; {↑D6から変更} {↓D5までの実装} { ----------------------------------- procedure EditProperty(PropertyEditor: TPropertyEditor; var Continue, FreeEditor: Boolean); override; //----------------------------------- } end; implementation { TStrResPropEditor } //------------------------------- //Componentをダブルクリックしたときに呼び出されるメソッド //>>詳しくはHELP procedure TStrResPropEditor.EditProperty(const Prop: IProperty; var Continue: Boolean); var PropName: string; begin inherited; PropName := Prop.GetName; if CompareText(PropName, 'Lines') = 0 then begin Prop.Edit; Continue := False; end; end; {↑D6から変更} {↓D5までの実装} { ----------------------------------- procedure TStrResPropEditor.EditProperty(PropertyEditor: TPropertyEditor; var Continue, FreeEditor: Boolean); var PropName: string; begin PropName := PropertyEditor.GetName; if (CompareText(PropName, 'Lines') = 0) then begin PropertyEditor.Edit; Continue := False; end; end; //----------------------------------- } end.