DelphiのCtrl+Shift+Cでプロパティの入力を補完できる。
プロパティの宣言部でCtrl+Shift+Cキーを押すと
TFoo = class
private
public
property Bar: String; //<=この行にカーソルを置いてCtrl+Shift+Cキーを押す
end;
次のようにコードが補完されます。
TFoo = class
private
FBar: String; //<=追加された
procedure SetBar(const Value: String); //<=追加された
public
property Bar: String read FBar write SetBar; //<=変更された
end;
procedure TFoo.SetBar(const Value: String); //<=追加された
begin //<=追加された
FBar := Value; //<=追加された
end; //<=追加された
さらに「read FBar」のところを「read GetBar」に変更してCtrl+Shift+Cキーを押すと
TFoo = class
private
FBar: String;
procedure SetBar(const Value: String);
function GetBar: String; //<=追加された
public
property Bar: String read GetBar write SetBar; //<=ここを変更してCtr+Shift+C
end;
function TFoo.GetBar: String; //<=追加された
begin //<=追加された
//<=追加された
end; //<=追加された
DelphiのIDEは奥が深いです。
知りませんでした。活用してみます。