unit TamoColu;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TFormaTamanoColumnas = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Edit7: TEdit;
    Edit8: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Edit1Exit(Sender: TObject);
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormaTamanoColumnas: TFormaTamanoColumnas;

implementation

{$R *.DFM}







procedure TFormaTamanoColumnas.Button1Click(Sender: TObject);
begin
Tag:=1;
Close;
end;

procedure TFormaTamanoColumnas.Edit1Exit(Sender: TObject);
begin


if Tag=0 then
begin

 with Sender as TEdit do
  begin
try

if Text='' then
Text:='20';

StrToInt(Text);

except
Text:='20';
end;

  end;
end;//if



end;

procedure TFormaTamanoColumnas.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if key=13 then
begin
Tag:=1;
Close;
end;

end;

end.
