Hola maxama.
Primero ajustamos la cantidad máxima de caracteres permitidos para cada
TEdit:
Código Delphi
[-]
procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.MaxLength:= 5;
Edit2.MaxLength:= 10;
Edit3.MaxLength:= 5;
end;
Seguidamente asociá el siguiente código a los eventos
OnExit de los tres
TEdit:
Código Delphi
[-]
procedure TForm1.EditExit(Sender: TObject);
begin
with (Sender as TEdit) do
if (Name = 'Edit1') or (Name = 'Edit3') then
Text:= StringOfChar('0',5-Length(Text)) + Text else
Text:= Text + StringOfChar(' ',10-Length(Text)) end;
Saludos.