I m hoping this is simple and possible I have a editbox
thats value is controlled by a spin button . How would I stop it from going into minus numbers ie -10 below 0.
here is the code i a using ...
{=======================================================}
procedure TForm1.SpinButton1DownClick(Sender: TObject);
var
Temp : Integer;
begin
Temp := StrToInt (Edit3.Text);
Temp := Temp - 10;
Edit3.Text := IntToStr (Temp)
end;
procedure TForm1.SpinButton1UpClick(Sender: TObject);
var
Temp : Integer;
begin
Temp := StrToInt (Edit3.Text);
Temp := Temp + 10;
Edit3.Text := IntToStr (Temp)
end;
{=========================================================}
Thanks
thats value is controlled by a spin button . How would I stop it from going into minus numbers ie -10 below 0.
here is the code i a using ...
{=======================================================}
procedure TForm1.SpinButton1DownClick(Sender: TObject);
var
Temp : Integer;
begin
Temp := StrToInt (Edit3.Text);
Temp := Temp - 10;
Edit3.Text := IntToStr (Temp)
end;
procedure TForm1.SpinButton1UpClick(Sender: TObject);
var
Temp : Integer;
begin
Temp := StrToInt (Edit3.Text);
Temp := Temp + 10;
Edit3.Text := IntToStr (Temp)
end;
{=========================================================}
Thanks