range limit of the input digital advEdit

procedure TForm1.FormCreate(Sender: TObject);
begin
  edtCtrlThd1.EditType:= etFloat;
  edtCtrlThd1.MaxFloatValue:= 999.99;
  edtCtrlThd1.MinFloatValue: = - 999.99 ;
  edtCtrlThd1.Signed:= true;
  edtCtrlThd1.MaxLength:= 7;
end;

procedure TForm1.edtCtrlThd1Exit (Sender: TObject);
was
  f:Double;
begin 
    f: = StrToFloat (TAdvEdit (transmitter) .text);
  IF F> TAdvEdit (transmitter) .MaxFloatValue simply 
    TAdvEdit (transmitter) .Value: = TAdvEdit (transmitter) .MaxFloatValue
   presence 
  if f <TAdvEdit (transmitter) .MinFloatValue simply 
    TAdvEdit (transmitter) .Value: = TAdvEdit (transmitter) .MinFloatValue;
over ;

Guess you like

Origin www.cnblogs.com/tobetterlife/p/12174809.html