begin if not (key in['0'..'9',#8,#13,#32]) then begin key:=#0; showmessage('inputan hanya angka ..'); end; end; procedure TFkelas.huruf(sender:TObject;var Key: Char); begin if not (key in['a'..'z','A'..'Z',#8,#13,#32]) then begin key:=#0; showmessage('inputan hanya huruf ..'); end; end;