___________
    ∧,,∧     /
   ミ,,゚Д゚彡 <  つかうでつ。
   ミ つ日   \___________
 〜ミ,,,,,, ,,ミ
     OSの機能を利用した数値入力&右寄せ/センタリング可エヂト

unit AlignmentEdit;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type
 TInputkey = (ikNormal, ikNumberOnly);
 TAlignmentEdit = class(TEdit)
 private
  FAlignment: TAlignment;
  FInputkey: TInputkey;
  procedure SetAlignment(const Value: TAlignment);
  procedure SetInputkey(const Value: TInputkey);
 protected
  procedure CreateParams(var Params: TCreateParams); override;
 public
  constructor Create(AOwner: TComponent); override;
 published
  property Alignment: TAlignment read FAlignment write SetAlignment;
  property Inputkey: TInputkey read FInputkey write SetInputkey;
 end;
procedure Register;
implementation
procedure Register;
begin
 RegisterComponents('Samples', [TAlignmentEdit]);
end;