Arsip: Data Harus Numeric

 
user image
more 15 years ago

ayam_jago

tolong dunk.. gimana cara set edit1.text harus di input dengan angka saja.. dan ada messegebox... urgent deadline besok siang... :?
user image
more 15 years ago

deepblue

try inttostr(edit1.text); except showmessage('data tidak valid. isi dengan angka'); end; dicobain dah!
user image
more 15 years ago

n3o_cybertech


var
 iValue: integer;
begin
 if not TryStrToInt(Edit1.Text,iValue) then
  ShowMessage('Harus angka euy!!!');
end;
user image
more 15 years ago

tendafahmi

Coba DI onKeyPress kasih ini
procedure TForm1.Edit1KeyPress(Sender: TObject;
  var Key: Char);
var koma : char;
begin
  koma := decimalseparator;
   if key = koma then
   begin
      if pos(koma,Edit1.Text)>0 then
     begin
         key :=#0;
        exit;
     end;
   end;
   if not (key in ['0'..'9',#8,koma]) then  key:=#0;
end;
[/color:e1841fb673][color=red:e1841fb673][/color:e1841fb673][color=red:e1841fb673]
more ...
  • Pages:
  • 1
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com