Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - (100 points delphi programming) How to realize that only integers greater than zero are allowed to be entered in edit?
(100 points delphi programming) How to realize that only integers greater than zero are allowed to be entered in edit?
LeftStr(edit 1.text, 1)='0 '

Changed to leftstr (edit 1.text+key, 1) =' 0'

Because it was empty at first, it judged editing before you pressed the key, so there was an error, so just add the pressed key and it will be OK!